FD.io VPP  v19.04-6-g6f05f72
Vector Packet Processing
dlmalloc.h File Reference
+ Include dependency graph for dlmalloc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dlmallinfo
 

Macros

#define FOOTERS   1 /* extra debugging */
 
#define DLM_MAGIC_CONSTANT   0xdeaddabe
 
#define USE_LOCKS   1
 
#define DLM_ABORT   {extern void os_panic(void); os_panic(); abort();}
 
#define ONLY_MSPACES   1
 
#define DLMALLOC_VERSION   20806
 
#define DLMALLOC_EXPORT   extern
 
#define MAX_SIZE_T   (~(size_t)0)
 
#define MSPACES   1
 
#define MALLOC_ALIGNMENT   ((size_t)(2 * sizeof(void *)))
 
#define DLM_ABORT_ON_ASSERT_FAILURE   1
 
#define PROCEED_ON_ERROR   0
 
#define INSECURE   0
 
#define MALLOC_INSPECT_ALL   0
 
#define HAVE_MMAP   1
 
#define MMAP_CLEARS   1
 
#define HAVE_MREMAP   0
 
#define MALLOC_FAILURE_ACTION   errno = ENOMEM;
 
#define HAVE_MORECORE   0
 
#define MORECORE_CONTIGUOUS   0
 
#define DEFAULT_GRANULARITY   ((size_t)64U * (size_t)1024U)
 
#define DEFAULT_TRIM_THRESHOLD   ((size_t)2U * (size_t)1024U * (size_t)1024U)
 
#define DEFAULT_MMAP_THRESHOLD   ((size_t)~0ULL)
 
#define MAX_RELEASE_CHECK_RATE   4095
 
#define USE_BUILTIN_FFS   0
 
#define USE_DEV_RANDOM   0
 
#define NO_MALLINFO   0
 
#define MALLINFO_FIELD_TYPE   size_t
 
#define NO_MALLOC_STATS   0
 
#define NO_SEGMENT_TRAVERSAL   0
 
#define M_TRIM_THRESHOLD   (-1)
 
#define M_GRANULARITY   (-2)
 
#define M_MMAP_THRESHOLD   (-3)
 
#define STRUCT_MALLINFO_DECLARED   1
 
#define NOINLINE
 
#define FORCEINLINE
 

Typedefs

typedef void * mspace
 

Functions

DLMALLOC_EXPORT mspace create_mspace (size_t capacity, int locked)
 
DLMALLOC_EXPORT size_t destroy_mspace (mspace msp)
 
DLMALLOC_EXPORT mspace create_mspace_with_base (void *base, size_t capacity, int locked)
 
DLMALLOC_EXPORT int mspace_track_large_chunks (mspace msp, int enable)
 
DLMALLOC_EXPORT void * mspace_malloc (mspace msp, size_t bytes)
 
DLMALLOC_EXPORT void mspace_free (mspace msp, void *mem)
 
DLMALLOC_EXPORT void * mspace_realloc (mspace msp, void *mem, size_t newsize)
 
DLMALLOC_EXPORT void * mspace_calloc (mspace msp, size_t n_elements, size_t elem_size)
 
DLMALLOC_EXPORT void * mspace_memalign (mspace msp, size_t alignment, size_t bytes)
 
DLMALLOC_EXPORT void ** mspace_independent_calloc (mspace msp, size_t n_elements, size_t elem_size, void *chunks[])
 
DLMALLOC_EXPORT void ** mspace_independent_comalloc (mspace msp, size_t n_elements, size_t sizes[], void *chunks[])
 
DLMALLOC_EXPORT size_t mspace_footprint (mspace msp)
 
DLMALLOC_EXPORT size_t mspace_max_footprint (mspace msp)
 
DLMALLOC_EXPORT struct dlmallinfo mspace_mallinfo (mspace msp)
 
DLMALLOC_EXPORT size_t mspace_usable_size (const void *mem)
 
DLMALLOC_EXPORT void mspace_malloc_stats (mspace msp)
 
DLMALLOC_EXPORT int mspace_trim (mspace msp, size_t pad)
 
DLMALLOC_EXPORT int mspace_mallopt (int, int)
 
DLMALLOC_EXPORT void * mspace_get_aligned (mspace msp, unsigned long n_user_data_bytes, unsigned long align, unsigned long align_offset)
 
DLMALLOC_EXPORT int mspace_is_heap_object (mspace msp, void *p)
 
DLMALLOC_EXPORT void mspace_get_address_and_size (mspace msp, char **addrp, size_t *sizep)
 
DLMALLOC_EXPORT void mspace_put (mspace msp, void *p)
 
DLMALLOC_EXPORT void mspace_put_no_offset (mspace msp, void *p)
 
DLMALLOC_EXPORT size_t mspace_usable_size_with_delta (const void *p)
 
DLMALLOC_EXPORT void mspace_disable_expand (mspace msp)
 
DLMALLOC_EXPORT void * mspace_least_addr (mspace msp)
 
DLMALLOC_EXPORT void mheap_get_trace (uword offset, uword size)
 
DLMALLOC_EXPORT void mheap_put_trace (uword offset, uword size)
 
DLMALLOC_EXPORT int mspace_enable_disable_trace (mspace msp, int enable)
 

Macro Definition Documentation

#define DEFAULT_GRANULARITY   ((size_t)64U * (size_t)1024U)

Definition at line 690 of file dlmalloc.h.

#define DEFAULT_MMAP_THRESHOLD   ((size_t)~0ULL)

Definition at line 723 of file dlmalloc.h.

#define DEFAULT_TRIM_THRESHOLD   ((size_t)2U * (size_t)1024U * (size_t)1024U)

Definition at line 695 of file dlmalloc.h.

#define DLM_ABORT   {extern void os_panic(void); os_panic(); abort();}

Definition at line 534 of file dlmalloc.h.

#define DLM_ABORT_ON_ASSERT_FAILURE   1

Definition at line 642 of file dlmalloc.h.

#define DLM_MAGIC_CONSTANT   0xdeaddabe

Definition at line 531 of file dlmalloc.h.

#define DLMALLOC_EXPORT   extern

Definition at line 545 of file dlmalloc.h.

#define DLMALLOC_VERSION   20806

Definition at line 541 of file dlmalloc.h.

#define FOOTERS   1 /* extra debugging */

Definition at line 530 of file dlmalloc.h.

#define FORCEINLINE

Definition at line 844 of file dlmalloc.h.

#define HAVE_MMAP   1

Definition at line 655 of file dlmalloc.h.

#define HAVE_MORECORE   0

Definition at line 673 of file dlmalloc.h.

#define HAVE_MREMAP   0

Definition at line 665 of file dlmalloc.h.

#define INSECURE   0

Definition at line 649 of file dlmalloc.h.

#define M_GRANULARITY   (-2)

Definition at line 762 of file dlmalloc.h.

#define M_MMAP_THRESHOLD   (-3)

Definition at line 763 of file dlmalloc.h.

#define M_TRIM_THRESHOLD   (-1)

Definition at line 761 of file dlmalloc.h.

#define MALLINFO_FIELD_TYPE   size_t

Definition at line 745 of file dlmalloc.h.

#define MALLOC_ALIGNMENT   ((size_t)(2 * sizeof(void *)))

Definition at line 633 of file dlmalloc.h.

#define MALLOC_FAILURE_ACTION   errno = ENOMEM;

Definition at line 669 of file dlmalloc.h.

#define MALLOC_INSPECT_ALL   0

Definition at line 652 of file dlmalloc.h.

#define MAX_RELEASE_CHECK_RATE   4095

Definition at line 730 of file dlmalloc.h.

#define MAX_SIZE_T   (~(size_t)0)

Definition at line 600 of file dlmalloc.h.

#define MMAP_CLEARS   1

Definition at line 658 of file dlmalloc.h.

#define MORECORE_CONTIGUOUS   0

Definition at line 679 of file dlmalloc.h.

#define MSPACES   1

Definition at line 627 of file dlmalloc.h.

#define NO_MALLINFO   0

Definition at line 742 of file dlmalloc.h.

#define NO_MALLOC_STATS   0

Definition at line 748 of file dlmalloc.h.

#define NO_SEGMENT_TRAVERSAL   0

Definition at line 751 of file dlmalloc.h.

#define NOINLINE

Definition at line 833 of file dlmalloc.h.

#define ONLY_MSPACES   1

Definition at line 535 of file dlmalloc.h.

#define PROCEED_ON_ERROR   0

Definition at line 645 of file dlmalloc.h.

#define STRUCT_MALLINFO_DECLARED   1

Definition at line 798 of file dlmalloc.h.

#define USE_BUILTIN_FFS   0

Definition at line 736 of file dlmalloc.h.

#define USE_DEV_RANDOM   0

Definition at line 739 of file dlmalloc.h.

#define USE_LOCKS   1

Definition at line 533 of file dlmalloc.h.

Typedef Documentation

typedef void* mspace

Definition at line 1306 of file dlmalloc.h.

Function Documentation

DLMALLOC_EXPORT mspace create_mspace ( size_t  capacity,
int  locked 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT mspace create_mspace_with_base ( void *  base,
size_t  capacity,
int  locked 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT size_t destroy_mspace ( mspace  msp)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void mheap_get_trace ( uword  offset,
uword  size 
)

Definition at line 64 of file mem_dlmalloc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void mheap_put_trace ( uword  offset,
uword  size 
)

Definition at line 151 of file mem_dlmalloc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void* mspace_calloc ( mspace  msp,
size_t  n_elements,
size_t  elem_size 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void mspace_disable_expand ( mspace  msp)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT int mspace_enable_disable_trace ( mspace  msp,
int  enable 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT size_t mspace_footprint ( mspace  msp)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void mspace_free ( mspace  msp,
void *  mem 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void mspace_get_address_and_size ( mspace  msp,
char **  addrp,
size_t *  sizep 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void* mspace_get_aligned ( mspace  msp,
unsigned long  n_user_data_bytes,
unsigned long  align,
unsigned long  align_offset 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void** mspace_independent_calloc ( mspace  msp,
size_t  n_elements,
size_t  elem_size,
void *  chunks[] 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void** mspace_independent_comalloc ( mspace  msp,
size_t  n_elements,
size_t  sizes[],
void *  chunks[] 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT int mspace_is_heap_object ( mspace  msp,
void *  p 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void* mspace_least_addr ( mspace  msp)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT struct dlmallinfo mspace_mallinfo ( mspace  msp)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void* mspace_malloc ( mspace  msp,
size_t  bytes 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void mspace_malloc_stats ( mspace  msp)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT int mspace_mallopt ( int  ,
int   
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT size_t mspace_max_footprint ( mspace  msp)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void* mspace_memalign ( mspace  msp,
size_t  alignment,
size_t  bytes 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void mspace_put ( mspace  msp,
void *  p 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void mspace_put_no_offset ( mspace  msp,
void *  p 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT void* mspace_realloc ( mspace  msp,
void *  mem,
size_t  newsize 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT int mspace_track_large_chunks ( mspace  msp,
int  enable 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT int mspace_trim ( mspace  msp,
size_t  pad 
)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT size_t mspace_usable_size ( const void *  mem)

+ Here is the caller graph for this function:

DLMALLOC_EXPORT size_t mspace_usable_size_with_delta ( const void *  p)

+ Here is the caller graph for this function: