Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/malloc.h
Show First 20 Lines • Show All 255 Lines • ▼ Show 20 Lines | |||||
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 *); | ||||
size_t malloc_size(size_t); | size_t malloc_size(size_t); | ||||
size_t malloc_usable_size(const void *); | size_t malloc_usable_size(const 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); | ||||
void *malloc_domainset_aligned(size_t size, size_t align, | |||||
struct malloc_type *mtp, struct domainset *ds, int flags) | |||||
__malloc_like __result_use_check __alloc_size(1); | |||||
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 20 Lines • Show All 41 Lines • Show Last 20 Lines |