]>
git.saurik.com Git - apple/xnu.git/blob - libsa/libsa/malloc.h
44638f139859c158c5aa3dfac3a03748aba45f9e
1 #ifndef _LIBSA_MALLOC_H_
2 #define _LIBSA_MALLOC_H_
8 * These functions are the minimum necessary for use
9 * by kld and its client.
11 void * malloc(size_t size
);
12 void * realloc(void * address
, size_t new_size
);
13 void free(void * address
);
15 void malloc_reset(void); // Destroy all memory regions
19 * These functions aren't compiled into the kernel.
20 * Their definitions are in the files malloc_debug
21 * and malloc_unused, in case they're ever needed.
24 void free_all(void); // "Free" all memory blocks
25 size_t malloc_size(void * address
);
26 int malloc_is_valid(void * address
);
29 size_t malloc_hiwat(void);
30 size_t malloc_current_usage(void);
31 size_t malloc_region_usage(void);
32 double malloc_peak_usage(void);
33 double malloc_min_usage(void);
34 size_t malloc_unused(void);
35 double malloc_current_efficiency(void);
36 void malloc_clear_hiwat(void);
37 void malloc_report(void);
38 int malloc_sanity_check(void);
42 #endif /* defined _LIBSA_MALLOC_H_ */