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