diff options
author | Jason Evans <jasone@canonware.com> | 2014-10-10 00:54:06 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2014-10-10 05:44:37 (GMT) |
commit | fc0b3b7383373d66cfed2cd4e2faa272a6868d32 (patch) | |
tree | 529043fc2e79c396241ad6808a92d2fddd36d21a /test/unit/lg_chunk.c | |
parent | b123ddc760e5b53dde17c6a19a130173067c0e30 (diff) | |
download | jemalloc-fc0b3b7383373d66cfed2cd4e2faa272a6868d32.zip jemalloc-fc0b3b7383373d66cfed2cd4e2faa272a6868d32.tar.gz jemalloc-fc0b3b7383373d66cfed2cd4e2faa272a6868d32.tar.bz2 |
Add configure options.
Add:
--with-lg-page
--with-lg-page-sizes
--with-lg-size-class-group
--with-lg-quantum
Get rid of STATIC_PAGE_SHIFT, in favor of directly setting LG_PAGE.
Fix various edge conditions exposed by the configure options.
Diffstat (limited to 'test/unit/lg_chunk.c')
-rw-r--r-- | test/unit/lg_chunk.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/unit/lg_chunk.c b/test/unit/lg_chunk.c new file mode 100644 index 0000000..7f0b31c --- /dev/null +++ b/test/unit/lg_chunk.c @@ -0,0 +1,26 @@ +#include "test/jemalloc_test.h" + +/* + * Make sure that opt.lg_chunk clamping is sufficient. In practice, this test + * program will fail a debug assertion during initialization and abort (rather + * than the test soft-failing) if clamping is insufficient. + */ +const char *malloc_conf = "lg_chunk:0"; + +TEST_BEGIN(test_lg_chunk_clamp) +{ + void *p; + + p = mallocx(1, 0); + assert_ptr_not_null(p, "Unexpected mallocx() failure"); + dallocx(p, 0); +} +TEST_END + +int +main(void) +{ + + return (test( + test_lg_chunk_clamp)); +} |