diff options
Diffstat (limited to 'innobase/include/ut0mem.h')
-rw-r--r-- | innobase/include/ut0mem.h | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/innobase/include/ut0mem.h b/innobase/include/ut0mem.h index fa46514fe16..8e5a4fda0d3 100644 --- a/innobase/include/ut0mem.h +++ b/innobase/include/ut0mem.h @@ -26,12 +26,39 @@ int ut_memcmp(void* str1, void* str2, ulint n); +/************************************************************************** +Allocates memory. Sets it also to zero if UNIV_SET_MEM_TO_ZERO is +defined and set_to_zero is TRUE. */ + void* -ut_malloc(ulint n); +ut_malloc_low( +/*==========*/ + /* out, own: allocated memory */ + ulint n, /* in: number of bytes to allocate */ + ibool set_to_zero); /* in: TRUE if allocated memory should be set + to zero if UNIV_SET_MEM_TO_ZERO is defined */ +/************************************************************************** +Allocates memory. Sets it also to zero if UNIV_SET_MEM_TO_ZERO is +defined. */ + +void* +ut_malloc( +/*======*/ + /* out, own: allocated memory */ + ulint n); /* in: number of bytes to allocate */ +/************************************************************************** +Frees a memory bloock allocated with ut_malloc. */ + +void +ut_free( +/*====*/ + void* ptr); /* in, own: memory block */ +/************************************************************************** +Frees all allocated memory not freed yet. */ -UNIV_INLINE void -ut_free(void* ptr); +ut_free_all_mem(void); +/*=================*/ UNIV_INLINE char* |