File: lg_chunk.c

package info (click to toggle)
redis 3%3A3.2.8-2~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 8,164 kB
  • sloc: ansic: 90,462; tcl: 12,122; perl: 4,046; sh: 4,006; ruby: 1,593; makefile: 1,064
file content (26 lines) | stat: -rw-r--r-- 512 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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));
}