2
0

lg_chunk.c 512 B

1234567891011121314151617181920212223242526
  1. #include "test/jemalloc_test.h"
  2. /*
  3. * Make sure that opt.lg_chunk clamping is sufficient. In practice, this test
  4. * program will fail a debug assertion during initialization and abort (rather
  5. * than the test soft-failing) if clamping is insufficient.
  6. */
  7. const char *malloc_conf = "lg_chunk:0";
  8. TEST_BEGIN(test_lg_chunk_clamp)
  9. {
  10. void *p;
  11. p = mallocx(1, 0);
  12. assert_ptr_not_null(p, "Unexpected mallocx() failure");
  13. dallocx(p, 0);
  14. }
  15. TEST_END
  16. int
  17. main(void)
  18. {
  19. return (test(
  20. test_lg_chunk_clamp));
  21. }