Data Structures | |
struct | mallinfo |
Macros | |
#define | ABORT_ON_ASSERT_FAILURE 1 |
#define | DEFAULT_GRANULARITY ((size_t)64U * (size_t)1024U) |
#define | DEFAULT_MMAP_THRESHOLD ((size_t)256U * (size_t)1024U) |
#define | DEFAULT_TRIM_THRESHOLD ((size_t)2U * (size_t)1024U * (size_t)1024U) |
#define | FOOTERS 0 |
#define | HAVE_MORECORE 0 |
#define | INSECURE 0 |
#define | M_GRANULARITY (-2) |
#define | M_MMAP_THRESHOLD (-3) |
#define | M_TRIM_THRESHOLD (-1) |
#define | MALLINFO_FIELD_TYPE size_t |
#define | MALLOC_ALIGNMENT ((size_t)8U) |
#define | MAP_ANONYMOUS 1 |
#define | MAX_SIZE_T (~(size_t)0) |
#define | MMAP_CLEARS 1 |
#define | MORECORE_CONTIGUOUS 0 |
#define | MSPACES 1 |
#define | NO_MALLINFO 0 |
#define | PROCEED_ON_ERROR 0 |
#define | USE_BUILTIN_FFS 0 |
#define | USE_DEV_RANDOM 0 |
#define | USE_LOCKS 0 |
Typedefs | |
typedef void * | mspace |
Functions | |
mspace | create_mspace (size_t capacity, int locked) |
mspace | create_mspace_with_base (void *base, size_t capacity, int locked) |
size_t | destroy_mspace (mspace msp) |
void * | mspace_calloc (mspace msp, size_t n_elements, size_t elem_size) |
size_t | mspace_footprint (mspace msp) |
void | mspace_free (mspace msp, void *mem) |
void ** | mspace_independent_calloc (mspace msp, size_t n_elements, size_t elem_size, void *chunks[]) |
void ** | mspace_independent_comalloc (mspace msp, size_t n_elements, size_t sizes[], void *chunks[]) |
struct mallinfo | mspace_mallinfo (mspace msp) |
void * | mspace_malloc (mspace msp, size_t bytes) |
void | mspace_malloc_stats (mspace msp) |
int | mspace_mallopt (int, int) |
size_t | mspace_max_footprint (mspace msp) |
void * | mspace_memalign (mspace msp, size_t alignment, size_t bytes) |
void * | mspace_realloc (mspace msp, void *mem, size_t newsize) |
int | mspace_trim (mspace msp, size_t pad) |
#define ABORT_ON_ASSERT_FAILURE 1 |
#define DEFAULT_GRANULARITY ((size_t)64U * (size_t)1024U) |
Referenced by init_mparams().
#define DEFAULT_MMAP_THRESHOLD ((size_t)256U * (size_t)1024U) |
Referenced by init_mparams().
#define DEFAULT_TRIM_THRESHOLD ((size_t)2U * (size_t)1024U * (size_t)1024U) |
Referenced by init_mparams().
#define FOOTERS 0 |
#define HAVE_MORECORE 0 |
Referenced by sys_alloc(), and sys_trim().
#define INSECURE 0 |
#define M_GRANULARITY (-2) |
Referenced by change_mparam().
#define M_MMAP_THRESHOLD (-3) |
Referenced by change_mparam().
#define M_TRIM_THRESHOLD (-1) |
Referenced by change_mparam().
#define MALLINFO_FIELD_TYPE size_t |
#define MALLOC_ALIGNMENT ((size_t)8U) |
Referenced by init_mparams(), and internal_memalign().
#define MAP_ANONYMOUS 1 |
#define MAX_SIZE_T (~(size_t)0) |
Referenced by init_mparams(), mspace_calloc(), mspace_malloc(), and sys_trim().
#define MMAP_CLEARS 1 |
#define MORECORE_CONTIGUOUS 0 |
Referenced by sys_alloc().
#define MSPACES 1 |
#define NO_MALLINFO 0 |
#define PROCEED_ON_ERROR 0 |
#define USE_BUILTIN_FFS 0 |
#define USE_DEV_RANDOM 0 |
#define USE_LOCKS 0 |
typedef void* mspace |
mspace create_mspace | ( | size_t | capacity, |
int | locked | ||
) |
mspace create_mspace_with_base | ( | void * | base, |
size_t | capacity, | ||
int | locked | ||
) |
References EXTERN_BIT, init_mparams(), init_user_mstate(), mparams, pad_request, malloc_params::page_size, malloc_state::seg, set_lock, malloc_segment::sflags, and TOP_FOOT_SIZE.
Referenced by load_sdram_data().
size_t destroy_mspace | ( | mspace | msp | ) |
void* mspace_calloc | ( | mspace | msp, |
size_t | n_elements, | ||
size_t | elem_size | ||
) |
References calloc_must_clear, internal_malloc, MAX_SIZE_T, mem2chunk, ok_magic, and USAGE_ERROR_ACTION.
size_t mspace_footprint | ( | mspace | msp | ) |
References malloc_state::footprint, ok_magic, and USAGE_ERROR_ACTION.
void mspace_free | ( | mspace | msp, |
void * | mem | ||
) |
References CALL_MUNMAP, check_free_chunk, check_inuse_chunk, chunk_minus_offset, chunk_plus_offset, chunksize, cinuse, malloc_state::dv, malloc_state::dvsize, malloc_state::footprint, malloc_chunk::head, insert_chunk, INUSE_BITS, mem2chunk, MMAP_FOOT_PAD, ok_address, ok_cinuse, ok_magic, ok_next, ok_pinuse, pinuse, PINUSE_BIT, POSTACTION, PREACTION, malloc_chunk::prev_foot, RTCHECK, set_free_with_pinuse, set_size_and_pinuse_of_free_chunk, should_trim, sys_trim(), malloc_state::top, malloc_state::topsize, unlink_chunk, and USAGE_ERROR_ACTION.
Referenced by jpeg_free_large(), jpeg_free_small(), jpeg_lib_exit(), jpeg_lib_init(), and mspace_realloc().
void** mspace_independent_calloc | ( | mspace | msp, |
size_t | n_elements, | ||
size_t | elem_size, | ||
void * | chunks[] | ||
) |
References ialloc(), ok_magic, and USAGE_ERROR_ACTION.
void** mspace_independent_comalloc | ( | mspace | msp, |
size_t | n_elements, | ||
size_t | sizes[], | ||
void * | chunks[] | ||
) |
References ialloc(), ok_magic, and USAGE_ERROR_ACTION.
References internal_mallinfo(), ok_magic, and USAGE_ERROR_ACTION.
void* mspace_malloc | ( | mspace | msp, |
size_t | bytes | ||
) |
References assert, b, check_malloced_chunk, check_top_chunk, chunk2mem, chunk_plus_offset, chunksize, compute_bit2idx, malloc_state::dv, malloc_state::dvsize, malloc_chunk::fd, malloc_chunk::head, idx2bit, least_bit, left_bits, MAX_REQUEST, MAX_SIZE_T, MAX_SMALL_REQUEST, MIN_CHUNK_SIZE, MIN_REQUEST, ok_magic, pad_request, PINUSE_BIT, POSTACTION, PREACTION, replace_dv, set_inuse_and_pinuse, set_size_and_pinuse_of_free_chunk, set_size_and_pinuse_of_inuse_chunk, SIZE_T_SIZE, small_index, small_index2size, smallbin_at, malloc_state::smallmap, sys_alloc(), tmalloc_large(), tmalloc_small(), malloc_state::top, malloc_state::topsize, malloc_state::treemap, unlink_first_small_chunk, and USAGE_ERROR_ACTION.
Referenced by jpeg_get_large(), jpeg_get_small(), jpeg_lib_init(), load_sdram_data(), and mspace_realloc().
void mspace_malloc_stats | ( | mspace | msp | ) |
References internal_malloc_stats(), ok_magic, and USAGE_ERROR_ACTION.
int mspace_mallopt | ( | int | , |
int | |||
) |
References change_mparam().
size_t mspace_max_footprint | ( | mspace | msp | ) |
References malloc_state::max_footprint, ok_magic, and USAGE_ERROR_ACTION.
void* mspace_memalign | ( | mspace | msp, |
size_t | alignment, | ||
size_t | bytes | ||
) |
References internal_memalign(), ok_magic, and USAGE_ERROR_ACTION.
void* mspace_realloc | ( | mspace | msp, |
void * | mem, | ||
size_t | newsize | ||
) |
References internal_realloc(), mem2chunk, mspace_free(), mspace_malloc(), ok_magic, and USAGE_ERROR_ACTION.
int mspace_trim | ( | mspace | msp, |
size_t | pad | ||
) |
References ok_magic, POSTACTION, PREACTION, sys_trim(), and USAGE_ERROR_ACTION.