]>
git.saurik.com Git - apple/xnu.git/blob - libsa/libsa/malloc.h
4183eaff7d9a66876dc12af0aadd253169951e79
1 #ifndef _LIBSA_MALLOC_H_
2 #define _LIBSA_MALLOC_H_
9 * These functions are the minimum necessary for use
10 * by kld and its client.
12 void * malloc(size_t size
);
13 void * realloc(void * address
, size_t new_size
);
14 void free(void * address
);
16 void malloc_init(void);
17 void malloc_reset(void); // Destroy all memory regions
21 * These functions aren't compiled into the kernel.
22 * Their definitions are in the files malloc_debug
23 * and malloc_unused, in case they're ever needed.
26 void free_all(void); // "Free" all memory blocks
27 size_t malloc_size(void * address
);
28 int malloc_is_valid(void * address
);
31 size_t malloc_hiwat(void);
32 size_t malloc_current_usage(void);
33 size_t malloc_region_usage(void);
34 double malloc_peak_usage(void);
35 double malloc_min_usage(void);
36 size_t malloc_unused(void);
37 double malloc_current_efficiency(void);
38 void malloc_clear_hiwat(void);
39 void malloc_report(void);
40 int malloc_sanity_check(void);
46 #endif /* defined _LIBSA_MALLOC_H_ */