diff options
Diffstat (limited to 'libtest/globals.c')
| -rw-r--r-- | libtest/globals.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/libtest/globals.c b/libtest/globals.c new file mode 100644 index 0000000..9e9ec2f --- /dev/null +++ b/libtest/globals.c @@ -0,0 +1,44 @@ +/* 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; + +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; + + +#else + + +CONST int +main(void) +{ + /* There isn't really anything to test here */ + return 0; +} + + +#endif |
