mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 05:33:06 +00:00
Hide size class computation behind a layer of indirection.
This class removes almost all the dependencies on size_classes.h, accessing the data there only via the new module sc.h, which does not depend on any configuration options. In a subsequent commit, we'll remove the configure-time size class computations, doing them at boot time, instead.
This commit is contained in:
committed by
David Goldblatt
parent
fb924dd7bf
commit
e904f813b4
@@ -29,12 +29,12 @@ TEST_BEGIN(test_gdump) {
|
||||
prof_dump_open = prof_dump_open_intercept;
|
||||
|
||||
did_prof_dump_open = false;
|
||||
p = mallocx((1U << LG_LARGE_MINCLASS), 0);
|
||||
p = mallocx((1U << sc_data_global.lg_large_minclass), 0);
|
||||
assert_ptr_not_null(p, "Unexpected mallocx() failure");
|
||||
assert_true(did_prof_dump_open, "Expected a profile dump");
|
||||
|
||||
did_prof_dump_open = false;
|
||||
q = mallocx((1U << LG_LARGE_MINCLASS), 0);
|
||||
q = mallocx((1U << sc_data_global.lg_large_minclass), 0);
|
||||
assert_ptr_not_null(q, "Unexpected mallocx() failure");
|
||||
assert_true(did_prof_dump_open, "Expected a profile dump");
|
||||
|
||||
@@ -45,7 +45,7 @@ TEST_BEGIN(test_gdump) {
|
||||
"Unexpected mallctl failure while disabling prof.gdump");
|
||||
assert(gdump_old);
|
||||
did_prof_dump_open = false;
|
||||
r = mallocx((1U << LG_LARGE_MINCLASS), 0);
|
||||
r = mallocx((1U << sc_data_global.lg_large_minclass), 0);
|
||||
assert_ptr_not_null(q, "Unexpected mallocx() failure");
|
||||
assert_false(did_prof_dump_open, "Unexpected profile dump");
|
||||
|
||||
@@ -56,7 +56,7 @@ TEST_BEGIN(test_gdump) {
|
||||
"Unexpected mallctl failure while enabling prof.gdump");
|
||||
assert(!gdump_old);
|
||||
did_prof_dump_open = false;
|
||||
s = mallocx((1U << LG_LARGE_MINCLASS), 0);
|
||||
s = mallocx((1U << sc_data_global.lg_large_minclass), 0);
|
||||
assert_ptr_not_null(q, "Unexpected mallocx() failure");
|
||||
assert_true(did_prof_dump_open, "Expected a profile dump");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user