Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/malloc.h
Show First 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | |||||
void malloc_type_allocated(struct malloc_type *type, unsigned long size); | void malloc_type_allocated(struct malloc_type *type, unsigned long size); | ||||
void malloc_type_freed(struct malloc_type *type, unsigned long size); | void malloc_type_freed(struct malloc_type *type, unsigned long size); | ||||
void malloc_type_list(malloc_type_list_func_t *, void *); | void malloc_type_list(malloc_type_list_func_t *, void *); | ||||
void malloc_uninit(void *); | void malloc_uninit(void *); | ||||
void *realloc(void *addr, size_t size, struct malloc_type *type, int flags) | void *realloc(void *addr, size_t size, struct malloc_type *type, int flags) | ||||
__result_use_check __alloc_size(2); | __result_use_check __alloc_size(2); | ||||
void *reallocf(void *addr, size_t size, struct malloc_type *type, int flags) | void *reallocf(void *addr, size_t size, struct malloc_type *type, int flags) | ||||
__result_use_check __alloc_size(2); | __result_use_check __alloc_size(2); | ||||
size_t malloc_usable_size(const void *); | |||||
kib: Move this line right after malloc_uninit() to keep declarations sorted by name. | |||||
struct malloc_type *malloc_desc2type(const char *desc); | struct malloc_type *malloc_desc2type(const char *desc); | ||||
/* | /* | ||||
* This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX | * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX | ||||
* if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW | * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW | ||||
*/ | */ | ||||
#define MUL_NO_OVERFLOW (1UL << (sizeof(size_t) * 8 / 2)) | #define MUL_NO_OVERFLOW (1UL << (sizeof(size_t) * 8 / 2)) | ||||
Show All 11 Lines |
Move this line right after malloc_uninit() to keep declarations sorted by name.