summaryrefslogtreecommitdiffstats
path: root/deps/jemalloc/test/integration/malloc.c
blob: 8b33bc8f3b5911370b7e8695413221624f688321 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "test/jemalloc_test.h"

TEST_BEGIN(test_zero_alloc) {
	void *res = malloc(0);
	assert(res);
	size_t usable = malloc_usable_size(res);
	assert(usable > 0);
	free(res);
}
TEST_END

int
main(void) {
	return test(
	    test_zero_alloc);
}