#import <objc/malloc.h>
typedef size_t _malloc_test_size_generator_t(unsigned context);
extern size_t _malloc_test_uniform_generator(unsigned context);
extern size_t _malloc_test_healthy_mix_generator(unsigned context);
extern size_t _malloc_test_constant_size(unsigned context);
extern void _malloc_test_basic_loop(malloc_zone_t *zone, unsigned count, _malloc_test_size_generator_t size_generator, unsigned context);
extern void _malloc_test_increasing_reallocs(malloc_zone_t *zone, unsigned count, unsigned increment);
extern void _malloc_test_allocate_a_bunch_then_free(malloc_zone_t *zone, unsigned count, _malloc_test_size_generator_t size_generator, unsigned context);
extern void **_malloc_test_random_fill(malloc_zone_t *zone, size_t array_size, _malloc_test_size_generator_t size_generator, unsigned context, int fd);
extern void **_malloc_test_worst_free_heap(malloc_zone_t *zone, size_t array_size, size_t item_size);
extern void _malloc_test_random_free(malloc_zone_t *zone, void **array, size_t num, int fd);
extern void _malloc_test_generational(malloc_zone_t *zone, unsigned allocation_budget, _malloc_test_size_generator_t size_generator, unsigned context);
#define _TEST_CLASS_ODD_SIZE 0x1357 // used for blocks which size is not multiple of 4
#define _TEST_CLASS_PTR_ARRAY 0x1234 // all pointers except word[0]
#define _TEST_CLASS_32_PTRS 2
#define _TEST_CLASS_PTR_ARRAY_AFTER (_TEST_CLASS_PTR_ARRAY + _TEST_CLASS_32_PTRS*32*4)
#define _TEST_CLASS_NO_PTR 0x9999 // all slots are non-pointers
extern void **_malloc_test_create_network(malloc_zone_t *zone, _malloc_test_size_generator_t size_generator, unsigned count, float point_to_another, unsigned context);