jemalloc/src
Qi Wang 72cfdce718 Allocate tcache stack from base allocator
When using metadata_thp, allocate tcache bin stacks from base0, which means they
will be placed on huge pages along with other metadata, instead of mixed with
other regular allocations.

In order to do so, modified the base allocator to support limited reuse: freed
tcached stacks (from thread termination) will be returned to base0 and made
available for reuse, but no merging will be attempted since they were bump
allocated out of base blocks. These reused base extents are managed using
separately allocated base edata_t -- they are cached in base->edata_avail when
the extent is all allocated.

One tricky part is, stats updating must be skipped for such reused extents
(since they were accounted for already, and there is no purging for base). This
requires tracking the "if is reused" state explicitly and bypass the stats
updates when allocating from them.
2023-09-18 12:18:32 -07:00
..
arena.c Enable per-tcache tcache_max 2023-09-06 10:47:14 -07:00
background_thread.c Fix all optimization-inhibiting integer-to-pointer casts 2023-07-24 14:40:42 -07:00
base.c Allocate tcache stack from base allocator 2023-09-18 12:18:32 -07:00
bin.c Edata: split up different list linkage uses. 2020-07-08 13:20:59 -07:00
bin_info.c Fix shadowed variable usage. 2021-12-23 10:55:08 -08:00
bitmap.c Remove beginning define in source files 2020-06-19 12:15:44 -07:00
buf_writer.c Remove beginning define in source files 2020-06-19 12:15:44 -07:00
cache_bin.c Allocate tcache stack from base allocator 2023-09-18 12:18:32 -07:00
ckh.c Fix shadowed variable usage. 2021-12-23 10:55:08 -08:00
counter.c Remove beginning define in source files 2020-06-19 12:15:44 -07:00
ctl.c Enable per-tcache tcache_max 2023-09-06 10:47:14 -07:00
decay.c Fix remaining static analysis warnings 2023-06-23 11:50:29 -07:00
div.c Add the div module, which allows fast division by dynamic values. 2017-12-21 14:25:43 -08:00
ecache.c San: Rename 'guard' to 'san' 2021-12-15 10:39:17 -08:00
edata.c Pairing heap: inline functions instead of macros. 2021-08-02 15:02:49 -07:00
edata_cache.c edata_cache: Allow unbounded fast caching. 2021-07-26 15:14:37 -07:00
ehooks.c Fix all optimization-inhibiting integer-to-pointer casts 2023-07-24 14:40:42 -07:00
emap.c San: Bump alloc frequently reused guarded allocations 2021-12-15 10:39:17 -08:00
eset.c Eset: Cache summary information for heap edatas. 2021-08-02 15:02:49 -07:00
exp_grow.c Rename geom_grow -> exp_grow. 2020-11-13 13:42:33 -08:00
extent.c Fix all optimization-inhibiting integer-to-pointer casts 2023-07-24 14:40:42 -07:00
extent_dss.c Fix all optimization-inhibiting integer-to-pointer casts 2023-07-24 14:40:42 -07:00
extent_mmap.c Remove beginning define in source files 2020-06-19 12:15:44 -07:00
fxp.c Add fxp: A fixed-point math library. 2020-12-04 23:48:19 -08:00
hook.c Enabled -Wstrict-prototypes and fixed warnings. 2023-07-06 12:00:02 -07:00
hpa.c Enabled -Wstrict-prototypes and fixed warnings. 2023-07-06 12:00:02 -07:00
hpa_hooks.c Make eligible global variables static and/or const 2023-07-06 14:15:12 -07:00
hpdata.c Fix all optimization-inhibiting integer-to-pointer casts 2023-07-24 14:40:42 -07:00
inspect.c Enable a few additional warnings for CI and fix the issues they uncovered 2023-08-11 13:56:23 -07:00
jemalloc.c Enable per-tcache tcache_max 2023-09-06 10:47:14 -07:00
jemalloc_cpp.cpp Enable a few additional warnings for CI and fix the issues they uncovered 2023-08-11 13:56:23 -07:00
large.c Fix all optimization-inhibiting integer-to-pointer casts 2023-07-24 14:40:42 -07:00
log.c Logging: allow logging with empty varargs. 2017-07-22 09:38:19 -07:00
malloc_io.c Fix remaining static analysis warnings 2023-06-23 11:50:29 -07:00
mutex.c Enable a few additional warnings for CI and fix the issues they uncovered 2023-08-11 13:56:23 -07:00
nstime.c Make eligible global variables static and/or const 2023-07-06 14:15:12 -07:00
pa.c Enable a few additional warnings for CI and fix the issues they uncovered 2023-08-11 13:56:23 -07:00
pa_extra.c HPA: Manage whole hugepages at a time. 2020-12-07 06:21:08 -08:00
pac.c Fix shadowed variable usage. 2021-12-23 10:55:08 -08:00
pages.c Enable a few additional warnings for CI and fix the issues they uncovered 2023-08-11 13:56:23 -07:00
pai.c Pass 'frequent_reuse' hint to PAI 2021-12-15 10:39:17 -08:00
peak_event.c Add experimental.thread.activity_callback. 2020-11-05 12:33:25 -08:00
prof.c Define PROF_TCTX_SENTINEL instead of using magic numbers 2023-07-24 14:40:42 -07:00
prof_data.c Fix all optimization-inhibiting integer-to-pointer casts 2023-07-24 14:40:42 -07:00
prof_log.c Make eligible global variables static and/or const 2023-07-06 14:15:12 -07:00
prof_recent.c Enabled -Wstrict-prototypes and fixed warnings. 2023-07-06 12:00:02 -07:00
prof_stats.c Track per size class internal fragmentation 2021-01-07 20:39:49 -08:00
prof_sys.c Enable a few additional warnings for CI and fix the issues they uncovered 2023-08-11 13:56:23 -07:00
psset.c Extract the calculation of psset heap assignment for an hpdata into a common function 2023-05-31 11:44:04 -07:00
rtree.c Remove beginning define in source files 2020-06-19 12:15:44 -07:00
safety_check.c Update safety check message to remove --enable-debug when it's already on. 2023-09-05 14:15:45 -07:00
san.c Fix all optimization-inhibiting integer-to-pointer casts 2023-07-24 14:40:42 -07:00
san_bump.c San: Create a function for committing and zeroing 2021-12-15 10:39:17 -08:00
sc.c Add comments and use meaningful vars in sz_psz2ind. 2022-03-24 16:56:59 -07:00
sec.c Do not disable SEC by default for 64k pages platforms 2022-03-24 22:05:35 -07:00
stats.c Make eligible global variables static and/or const 2023-07-06 14:15:12 -07:00
sz.c Implement opt.cache_oblivious. 2021-02-11 11:32:01 -08:00
tcache.c Allocate tcache stack from base allocator 2023-09-18 12:18:32 -07:00
test_hooks.c Enabled -Wstrict-prototypes and fixed warnings. 2023-07-06 12:00:02 -07:00
thread_event.c Fix the initialization of last_event in thread event init. 2021-11-16 10:28:00 -08:00
ticker.c Add ticker_geom_t. 2021-02-04 14:10:43 -08:00
ticker.py Add ticker_geom_t. 2021-02-04 14:10:43 -08:00
tsd.c Enabled -Wstrict-prototypes and fixed warnings. 2023-07-06 12:00:02 -07:00
witness.c Remove beginning define in source files 2020-06-19 12:15:44 -07:00
zone.c Fix deadlock in multithreaded fork in OS X. 2017-07-10 18:17:12 -07:00