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