Geant4.10
|
#include <stddef.h>
Go to the source code of this file.
Data Structures | |
struct | mallinfo |
Macros | |
#define | MSPACES 1 |
#define | ONLY_MSPACES 0 /* define to a value */ |
#define | NO_MALLINFO 0 |
#define | dlcalloc mycalloc |
#define | dlfree myfree |
#define | dlmalloc mymalloc |
#define | dlmemalign mymemalign |
#define | dlrealloc myrealloc |
#define | dlvalloc myvalloc |
#define | dlpvalloc mypvalloc |
#define | dlmallinfo mymallinfo |
#define | dlmallopt mymallopt |
#define | dlmalloc_trim mymalloc_trim |
#define | dlmalloc_stats mymalloc_stats |
#define | dlmalloc_usable_size mymalloc_usable_size |
#define | dlmalloc_footprint mymalloc_footprint |
#define | dlindependent_calloc myindependent_calloc |
#define | dlindependent_comalloc myindependent_comalloc |
#define | MALLINFO_FIELD_TYPE size_t |
#define | STRUCT_MALLINFO_DECLARED 1 |
#define | M_TRIM_THRESHOLD (-1) |
#define | M_GRANULARITY (-2) |
#define | M_MMAP_THRESHOLD (-3) |
Typedefs | |
typedef void * | mspace |
#define dlcalloc mycalloc |
Definition at line 47 of file mymalloc.h.
#define dlfree myfree |
Definition at line 48 of file mymalloc.h.
#define dlindependent_calloc myindependent_calloc |
Definition at line 60 of file mymalloc.h.
#define dlindependent_comalloc myindependent_comalloc |
Definition at line 61 of file mymalloc.h.
#define dlmallinfo mymallinfo |
Definition at line 54 of file mymalloc.h.
#define dlmalloc mymalloc |
Definition at line 49 of file mymalloc.h.
#define dlmalloc_footprint mymalloc_footprint |
Definition at line 59 of file mymalloc.h.
void dlmalloc_stats mymalloc_stats |
Definition at line 57 of file mymalloc.h.
#define dlmalloc_trim mymalloc_trim |
Definition at line 56 of file mymalloc.h.
#define dlmalloc_usable_size mymalloc_usable_size |
Definition at line 58 of file mymalloc.h.
#define dlmallopt mymallopt |
Definition at line 55 of file mymalloc.h.
#define dlmemalign mymemalign |
Definition at line 50 of file mymalloc.h.
#define dlpvalloc mypvalloc |
Definition at line 53 of file mymalloc.h.
#define dlrealloc myrealloc |
Definition at line 51 of file mymalloc.h.
#define dlvalloc myvalloc |
Definition at line 52 of file mymalloc.h.
#define M_GRANULARITY (-2) |
Definition at line 185 of file mymalloc.h.
#define M_MMAP_THRESHOLD (-3) |
Definition at line 186 of file mymalloc.h.
#define M_TRIM_THRESHOLD (-1) |
Definition at line 184 of file mymalloc.h.
#define MALLINFO_FIELD_TYPE size_t |
Definition at line 67 of file mymalloc.h.
#define MSPACES 1 |
Definition at line 28 of file mymalloc.h.
#define NO_MALLINFO 0 |
Definition at line 40 of file mymalloc.h.
Definition at line 37 of file mymalloc.h.
#define STRUCT_MALLINFO_DECLARED 1 |
Definition at line 70 of file mymalloc.h.
Definition at line 419 of file mymalloc.h.
Definition at line 4974 of file mymalloc.cc.
References CALL_MMAP, CMFAIL, ensure_initialization, malloc_params::granularity, granularity_align, HAVE_MMAP, HAVE_MORECORE, python.hepunit::m, MSPACES, ONLY_MSPACES, pad_request, malloc_params::page_size, malloc_state::seg, set_lock, malloc_segment::sflags, TOP_FOOT_SIZE, USE_LOCKS, and USE_MMAP_BIT.
Referenced by calloc(), malloc(), realloc(), and valloc().
Definition at line 5005 of file mymalloc.cc.
References ensure_initialization, EXTERN_BIT, python.hepunit::m, pad_request, malloc_params::page_size, malloc_state::seg, set_lock, malloc_segment::sflags, and TOP_FOOT_SIZE.
size_t destroy_mspace | ( | mspace | msp | ) |
Definition at line 5034 of file mymalloc.cc.
References malloc_segment::base, CALL_MUNMAP, EXTERN_BIT, python.hepunit::ms, malloc_segment::next, ok_magic, malloc_state::seg, malloc_segment::sflags, malloc_segment::size, USAGE_ERROR_ACTION, and USE_MMAP_BIT.
void * dlcalloc | ( | size_t | n_elements, |
size_t | elem_size | ||
) |
Definition at line 4837 of file mymalloc.cc.
References calloc_must_clear, dlmalloc, MAX_SIZE_T, and mem2chunk.
Definition at line 4728 of file mymalloc.cc.
References CALL_MUNMAP, check_free_chunk, check_inuse_chunk, chunk_minus_offset, chunk_plus_offset, chunksize, cinuse, malloc_state::dv, malloc_state::dvsize, fm, malloc_state::footprint, malloc_chunk::head, insert_large_chunk, insert_small_chunk, INUSE_BITS, is_mmapped, is_small, mem2chunk, MMAP_FOOT_PAD, ok_address, ok_inuse, ok_magic, ok_next, ok_pinuse, pinuse, PINUSE_BIT, POSTACTION, PREACTION, malloc_chunk::prev_foot, malloc_state::release_checks, RTCHECK, set_free_with_pinuse, set_size_and_pinuse_of_free_chunk, should_trim, malloc_state::top, malloc_state::topsize, unlink_chunk, and USAGE_ERROR_ACTION.
Definition at line 4923 of file mymalloc.cc.
References gm.
void * dlmalloc | ( | size_t | bytes | ) |
Definition at line 4592 of file mymalloc.cc.
References assert, test::b, check_malloced_chunk, check_top_chunk, chunk2mem, chunk_plus_offset, chunksize, compute_bit2idx, ensure_initialization, malloc_chunk::fd, gm, malloc_chunk::head, idx2bit, least_bit, left_bits, MAX_REQUEST, MAX_SIZE_T, MAX_SMALL_REQUEST, MIN_CHUNK_SIZE, MIN_REQUEST, 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, and unlink_first_small_chunk.
size_t dlmalloc_footprint | ( | void | ) |
Definition at line 4914 of file mymalloc.cc.
References gm.
void dlmalloc_stats | ( | ) |
Definition at line 4928 of file mymalloc.cc.
References gm.
int dlmalloc_trim | ( | size_t | pad | ) |
Definition at line 4904 of file mymalloc.cc.
References ensure_initialization, gm, POSTACTION, and PREACTION.
size_t dlmalloc_usable_size | ( | void * | mem | ) |
Definition at line 4938 of file mymalloc.cc.
References chunksize, is_inuse, mem2chunk, and overhead_for.
Definition at line 4932 of file mymalloc.cc.
void * dlmemalign | ( | size_t | alignment, |
size_t | bytes | ||
) |
void * dlpvalloc | ( | size_t | bytes | ) |
Definition at line 4897 of file mymalloc.cc.
References dlmemalign, ensure_initialization, malloc_params::page_size, and SIZE_T_ONE.
Definition at line 4852 of file mymalloc.cc.
References dlfree, dlmalloc, gm, mem2chunk, ok_magic, and USAGE_ERROR_ACTION.
void * dlvalloc | ( | size_t | bytes | ) |
Definition at line 4890 of file mymalloc.cc.
References dlmemalign, ensure_initialization, and malloc_params::page_size.
Definition at line 5276 of file mymalloc.cc.
References calloc_must_clear, internal_malloc, MAX_SIZE_T, mem2chunk, python.hepunit::ms, ok_magic, and USAGE_ERROR_ACTION.
Referenced by calloc().
size_t mspace_footprint | ( | mspace | msp | ) |
Definition at line 5375 of file mymalloc.cc.
References malloc_state::footprint, python.hepunit::ms, ok_magic, and USAGE_ERROR_ACTION.
Definition at line 5175 of file mymalloc.cc.
References CALL_MUNMAP, check_free_chunk, check_inuse_chunk, chunk_minus_offset, chunk_plus_offset, chunksize, cinuse, malloc_state::dv, malloc_state::dvsize, fm, malloc_state::footprint, malloc_chunk::head, insert_large_chunk, insert_small_chunk, INUSE_BITS, is_mmapped, is_small, mem2chunk, MMAP_FOOT_PAD, ok_address, ok_inuse, ok_magic, ok_next, ok_pinuse, pinuse, PINUSE_BIT, POSTACTION, PREACTION, malloc_chunk::prev_foot, malloc_state::release_checks, RTCHECK, set_free_with_pinuse, set_size_and_pinuse_of_free_chunk, should_trim, malloc_state::top, malloc_state::topsize, unlink_chunk, and USAGE_ERROR_ACTION.
Referenced by cfree(), free(), and mspace_realloc().
void ** mspace_independent_calloc | ( | mspace | msp, |
size_t | n_elements, | ||
size_t | elem_size, | ||
void * | chunks[] | ||
) |
Definition at line 5329 of file mymalloc.cc.
References python.hepunit::ms, ok_magic, and USAGE_ERROR_ACTION.
void ** mspace_independent_comalloc | ( | mspace | msp, |
size_t | n_elements, | ||
size_t | sizes[], | ||
void * | chunks[] | ||
) |
Definition at line 5340 of file mymalloc.cc.
References python.hepunit::ms, ok_magic, and USAGE_ERROR_ACTION.
Definition at line 5402 of file mymalloc.cc.
References python.hepunit::ms, ok_magic, and USAGE_ERROR_ACTION.
Definition at line 5061 of file mymalloc.cc.
References assert, test::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, python.hepunit::ms, 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, malloc_state::top, malloc_state::topsize, malloc_state::treemap, unlink_first_small_chunk, and USAGE_ERROR_ACTION.
Referenced by malloc(), mspace_realloc(), and valloc().
Definition at line 5365 of file mymalloc.cc.
References python.hepunit::ms, ok_magic, and USAGE_ERROR_ACTION.
Definition at line 5420 of file mymalloc.cc.
Definition at line 5320 of file mymalloc.cc.
References python.hepunit::ms, ok_magic, and USAGE_ERROR_ACTION.
Definition at line 5296 of file mymalloc.cc.
References mem2chunk, python.hepunit::ms, mspace_free(), mspace_malloc(), ok_magic, and USAGE_ERROR_ACTION.
Referenced by realloc().
Definition at line 5019 of file mymalloc.cc.
References disable_mmap, enable_mmap, python.hepunit::ms, POSTACTION, PREACTION, and use_mmap.
Definition at line 5350 of file mymalloc.cc.
References python.hepunit::ms, ok_magic, POSTACTION, PREACTION, and USAGE_ERROR_ACTION.
size_t mspace_usable_size | ( | void * | mem | ) |
Definition at line 5411 of file mymalloc.cc.
References chunksize, is_inuse, mem2chunk, and overhead_for.