blob: cf8164eac2297f1fe670109b673df1d95d0873ee (
plain) (
blame)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/* See LICENSE file for copyright and license details. */
#include "common.h"
#ifndef TEST
volatile int libtest_malloc_is_custom = -1;
volatile int libtest_calloc_is_custom = -1;
volatile int libtest_realloc_is_custom = -1;
volatile int libtest_reallocarray_is_custom = -1;
volatile int libtest_valloc_is_custom = -1;
volatile int libtest_pvalloc_is_custom = -1;
volatile int libtest_memalign_is_custom = -1;
volatile int libtest_aligned_alloc_is_custom = -1;
volatile int libtest_posix_memalign_is_custom = -1;
volatile int libtest_malloc_usable_size_is_custom = -1;
volatile int libtest_free_is_custom = -1;
volatile int libtest_free_sized_is_custom = -1;
volatile int libtest_free_aligned_sized_is_custom = -1;
volatile int libtest_strdup_is_custom = -1;
volatile int libtest_strndup_is_custom = -1;
volatile int libtest_wcsdup_is_custom = -1;
volatile int libtest_wcsndup_is_custom = -1;
volatile int libtest_memdup_is_custom = -1;
volatile int libtest_mmap_is_custom = -1;
volatile int libtest_munmap_is_custom = -1;
volatile int libtest_mremap_is_custom = -1;
struct meminfo libtest_allocs_head;
struct meminfo libtest_allocs_tail;
int libtest_allocs_list_inited = 0;
atomic_flag libtest_allocs_list_spinlock = ATOMIC_FLAG_INIT;
int libtest_zero_on_alloc = 0;
int libtest_expect_zeroed = 0;
int libtest_malloc_accept_leakage = 1;
_Thread_local size_t libtest_malloc_internal_usage = 0u;
_Thread_local size_t libtest_kill_malloc_tracking = 0u;
_Thread_local size_t libtest_malloc_fail_in = 0u;
#else
CONST int
main(void)
{
/* There isn't really anything to test here */
return 0;
}
#endif
|