jemalloc/test/unit
Slobodan Predolac a0f2bdf91d Fix missing negation in large_ralloc_no_move usize_min fallback
The second expansion attempt in large_ralloc_no_move omitted the !
before large_ralloc_no_move_expand(), inverting the return value.
On expansion failure, the function falsely reported success, making
callers believe the allocation was expanded in-place when it was not.
On expansion success, the function falsely reported failure, causing
callers to unnecessarily allocate, copy, and free.

Add unit test that verifies the return value matches actual size change.
2026-04-01 23:15:19 -04:00
..
a0.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
arena_decay.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
arena_decay.sh Allow opt.tcache_max to accept small size classes. 2020-10-24 20:43:44 -07:00
arena_reset.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
arena_reset_prof.c Use MALLOC_CONF rather than malloc_conf for tests. 2017-02-23 08:57:02 -08:00
arena_reset_prof.sh Use MALLOC_CONF rather than malloc_conf for tests. 2017-02-23 08:57:02 -08:00
atomic.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
background_thread.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
background_thread_enable.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
background_thread_init.c Fix background thread initialization race 2026-03-10 18:14:33 -07:00
base.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
batch_alloc.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
batch_alloc.sh Add batch allocation API 2020-07-31 09:16:50 -07:00
batch_alloc_prof.c Add batch allocation API 2020-07-31 09:16:50 -07:00
batch_alloc_prof.sh Add batch allocation API 2020-07-31 09:16:50 -07:00
bin.c Add unit test coverage for bin interfaces 2026-03-10 18:14:33 -07:00
binshard.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
binshard.sh Fix binshard.sh by specifying bin_shards for all sizes. 2025-05-28 19:21:49 -07:00
bit_util.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
bitmap.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
buf_writer.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
cache_bin.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
ckh.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
conf.c Add unit tests for conf parsing and its helpers 2026-03-10 18:14:33 -07:00
conf_init_0.c Add unit tests for conf parsing and its helpers 2026-03-10 18:14:33 -07:00
conf_init_1.c Add unit tests for conf parsing and its helpers 2026-03-10 18:14:33 -07:00
conf_init_confirm.c Add unit tests for conf parsing and its helpers 2026-03-10 18:14:33 -07:00
conf_parse.c Add unit tests for conf parsing and its helpers 2026-03-10 18:14:33 -07:00
counter.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
decay.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
div.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
double_free.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
double_free.h Eagerly detect double free and sized dealloc bugs for large sizes. 2020-10-15 10:03:16 -07:00
edata_cache.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
emitter.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
extent_quantize.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
fb.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
fork.c Revert PR #2608: Manually revert commits 70c94d..f9c0b5 2026-03-10 18:14:33 -07:00
fxp.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
hash.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
hook.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
hpa.c [SEC] Make SEC owned by hpa_shard, simplify the code, add stats, lock per bin 2026-03-10 18:14:33 -07:00
hpa.sh When extracting from central, hugify_eager is different than start_as_huge 2026-03-10 18:14:33 -07:00
hpa_background_thread.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
hpa_background_thread.sh When extracting from central, hugify_eager is different than start_as_huge 2026-03-10 18:14:33 -07:00
hpa_sec_integration.c [SEC] Make SEC owned by hpa_shard, simplify the code, add stats, lock per bin 2026-03-10 18:14:33 -07:00
hpa_sec_integration.sh [SEC] Make SEC owned by hpa_shard, simplify the code, add stats, lock per bin 2026-03-10 18:14:33 -07:00
hpa_thp_always.c [SEC] Make SEC owned by hpa_shard, simplify the code, add stats, lock per bin 2026-03-10 18:14:33 -07:00
hpa_thp_always.sh When extracting from central, hugify_eager is different than start_as_huge 2026-03-10 18:14:33 -07:00
hpa_vectorized_madvise.c [SEC] Make SEC owned by hpa_shard, simplify the code, add stats, lock per bin 2026-03-10 18:14:33 -07:00
hpa_vectorized_madvise.sh When extracting from central, hugify_eager is different than start_as_huge 2026-03-10 18:14:33 -07:00
hpa_vectorized_madvise_large_batch.c [SEC] Make SEC owned by hpa_shard, simplify the code, add stats, lock per bin 2026-03-10 18:14:33 -07:00
hpa_vectorized_madvise_large_batch.sh [process_madvise] Use process_madvise across multiple huge_pages 2025-04-25 19:19:03 -07:00
hpdata.c [HPA] Add ability to start page as huge and more flexibility for purging 2026-03-10 18:14:33 -07:00
huge.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
inspect.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
inspect.sh Add the profiling settings for tests explicit. 2021-12-22 20:10:28 -08:00
json_stats.c Fix duplicate "nactive_huge" JSON key in HPA shard stats output 2026-04-01 23:15:19 -04:00
junk.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
junk.sh Use MALLOC_CONF rather than malloc_conf for tests. 2017-02-23 08:57:02 -08:00
junk_alloc.c Use MALLOC_CONF rather than malloc_conf for tests. 2017-02-23 08:57:02 -08:00
junk_alloc.sh Use MALLOC_CONF rather than malloc_conf for tests. 2017-02-23 08:57:02 -08:00
junk_free.c Use MALLOC_CONF rather than malloc_conf for tests. 2017-02-23 08:57:02 -08:00
junk_free.sh Use MALLOC_CONF rather than malloc_conf for tests. 2017-02-23 08:57:02 -08:00
large_ralloc.c Fix missing negation in large_ralloc_no_move usize_min fallback 2026-04-01 23:15:19 -04:00
log.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
mallctl.c Fix off-by-one in arenas_bin_i_index and arenas_lextent_i_index bounds checks 2026-04-01 23:15:19 -04:00
malloc_conf_2.c Add unit tests for conf parsing and its helpers 2026-03-10 18:14:33 -07:00
malloc_conf_2.sh Add malloc_conf_2_conf_harder 2020-03-31 06:25:08 -07:00
malloc_io.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
math.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
mpsc_queue.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
mq.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
mtx.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
ncached_max.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
nstime.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
oversize_threshold.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
pa.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
pack.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
pack.sh Refactor *decay_time into *decay_ms. 2017-05-18 11:33:45 -07:00
pages.c Refactor init_system_thp_mode and print it in malloc stats. 2026-03-10 18:14:33 -07:00
peak.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
ph.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prng.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prof_accum.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prof_accum.sh Use MALLOC_CONF rather than malloc_conf for tests. 2017-02-23 08:57:02 -08:00
prof_active.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prof_active.sh Add the profiling settings for tests explicit. 2021-12-22 20:10:28 -08:00
prof_gdump.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prof_gdump.sh Enable heap profiling on MacOS 2024-04-09 12:57:01 -07:00
prof_hook.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prof_hook.sh Making jemalloc max stack depth a runtime option 2022-09-12 13:56:22 -07:00
prof_idump.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prof_idump.sh Remove --disable-tcache. 2017-04-21 10:06:12 -07:00
prof_log.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prof_log.sh Add the profiling settings for tests explicit. 2021-12-22 20:10:28 -08:00
prof_mdump.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prof_mdump.sh Push error handling logic out of core dumping logic 2020-06-29 14:27:50 -07:00
prof_recent.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prof_recent.sh Add the prof_sys_thread_name feature in the prof_recent unit test. 2023-05-11 09:10:57 -07:00
prof_reset.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prof_reset.sh Last-N profiling mode 2019-12-30 15:58:57 -08:00
prof_small.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prof_small.sh Add a test-case for small profiled allocations 2023-07-03 16:19:06 -07:00
prof_stats.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prof_stats.sh Add the profiling settings for tests explicit. 2021-12-22 20:10:28 -08:00
prof_sys_thread_name.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prof_sys_thread_name.sh Add the profiling settings for tests explicit. 2021-12-22 20:10:28 -08:00
prof_tctx.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prof_tctx.sh Add the profiling settings for tests explicit. 2021-12-22 20:10:28 -08:00
prof_thread_name.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
prof_thread_name.sh Use MALLOC_CONF rather than malloc_conf for tests. 2017-02-23 08:57:02 -08:00
psset.c Fix psset_pick_purge when last candidate with index 0 dirtiness is ineligible 2026-03-26 10:39:37 -07:00
ql.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
qr.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
rb.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
retained.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
rtree.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
safety_check.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
safety_check.sh Add the profiling settings for tests explicit. 2021-12-22 20:10:28 -08:00
san.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
san.sh San: Rename 'guard' to 'san' 2021-12-15 10:39:17 -08:00
san_bump.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
sc.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
sec.c [SEC] Make SEC owned by hpa_shard, simplify the code, add stats, lock per bin 2026-03-10 18:14:33 -07:00
seq.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
SFMT.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
size_check.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
size_check.sh Add the profiling settings for tests explicit. 2021-12-22 20:10:28 -08:00
size_classes.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
size_classes.sh Renaming limit_usize_gap to disable_large_size_classes 2025-05-06 14:47:35 -07:00
slab.c Move bin inline functions from arena_inlines_b.h to bin_inlines.h 2026-03-10 18:14:33 -07:00
smoothstep.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
spin.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
stats.c Add a mallctl for users to get an approximate of active bytes. 2026-03-10 18:14:33 -07:00
stats_print.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
sz.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
tcache_init.c Handle tcache init failures gracefully 2026-03-10 18:14:33 -07:00
tcache_max.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
tcache_max.sh skip tcache GC for tcache_max unit test 2024-06-25 12:59:45 -07:00
test_hooks.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
thread_event.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
thread_event.sh Build a general purpose thread event handler 2019-11-04 11:15:50 -08:00
ticker.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
tsd.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
uaf.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
witness.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
zero.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
zero.sh Use MALLOC_CONF rather than malloc_conf for tests. 2017-02-23 08:57:02 -08:00
zero_realloc_abort.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
zero_realloc_abort.sh Realloc: Make behavior of realloc(ptr, 0) configurable. 2019-10-29 17:48:44 -07:00
zero_realloc_alloc.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
zero_realloc_alloc.sh Rename zero_realloc option "strict" to "alloc". 2022-04-20 10:27:25 -07:00
zero_realloc_free.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
zero_realloc_free.sh Realloc: Make behavior of realloc(ptr, 0) configurable. 2019-10-29 17:48:44 -07:00
zero_reallocs.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
zero_reallocs.sh Add stats counters for number of zero reallocs 2019-10-29 17:48:44 -07:00