PPL Logo

conv-core/memory-paranoid.C File Reference

Go to the source code of this file.

Data Structures

struct  _Slot
 Struct Slot contains all of the information about a malloc buffer except for the contents of its memory. More...

Typedefs

typedef struct _Slot Slot

Functions

static void memAbort (const char *err, void *ptr)
static void setPad (char *pad)
static void fill_uninit (char *loc, int len)
static char * Slot_toUser (Slot *s)
static void slotAbort (const char *why, Slot *s)
static void checkPad (const char *pad, const char *errMsg, const void *ptr, Slot *s)
static int badPointer (Slot *p)
static void checkSlot (Slot *s)
void memory_check (void)
void CmiMemoryMark (void)
void CmiMemoryMarkBlock (void *blk)
void CmiMemorySweep (const char *where)
void CmiMemoryCheck (void)
static void * setSlot (Slot *s, int userSize)
static void freeSlot (Slot *s)
static SlotSlot_fmUser (void *user)
static void status (const char *msg)
static void meta_init (char **argv)
static void * meta_malloc (size_t size)
static void meta_free (void *mem)
static void * meta_calloc (size_t nelem, size_t size)
static void meta_cfree (void *mem)
static void * meta_realloc (void *oldBuffer, size_t newSize)
static void * meta_memalign (size_t align, size_t size)
static int meta_posix_memalign (void **outptr, size_t align, size_t size)
static void * meta_aligned_alloc (size_t align, size_t size)
static void * meta_valloc (size_t size)
static void * meta_pvalloc (size_t size)

Variables

static size_t max_allocated = 0
static int memory_fill = -1
static int memory_fillphase = 0
static Slot slot_first = {&slot_first,&slot_first}
static int memory_checkfreq = 100
static int memory_checkphase = 0
static int memory_verbose = 0
static int memoryTraceDisabled = 0


Typedef Documentation

typedef struct _Slot Slot

Definition at line 63 of file memory-paranoid.C.


Function Documentation

static void memAbort ( const char *  err,
void *  ptr 
) [static]

Definition at line 17 of file memory-paranoid.C.

References abort(), CmiAbort(), CmiMyPe(), and CmiPrintf().

Referenced by meta_free(), and slotAbort().

Here is the call graph for this function:

Here is the caller graph for this function:

static void setPad ( char *  pad  )  [static]

Definition at line 68 of file memory-paranoid.C.

Referenced by setSlot().

Here is the caller graph for this function:

static void fill_uninit ( char *  loc,
int  len 
) [static]

Definition at line 77 of file memory-paranoid.C.

References memory_fill, and memory_fillphase.

Referenced by freeSlot(), and setSlot().

Here is the caller graph for this function:

static char* Slot_toUser ( Slot s  )  [static]

Definition at line 90 of file memory-paranoid.C.

static void slotAbort ( const char *  why,
Slot s 
) [static]

Definition at line 104 of file memory-paranoid.C.

References CmiBacktracePrint(), CmiMyPe(), CmiPrintf(), Slot::from, memAbort(), memory_checkfreq, Slot_toUser(), and Slot::userSize.

Referenced by checkPad(), and checkSlot().

Here is the call graph for this function:

Here is the caller graph for this function:

static void checkPad ( const char *  pad,
const char *  errMsg,
const void *  ptr,
Slot s 
) [static]

Definition at line 113 of file memory-paranoid.C.

References memory_checkfreq, and slotAbort().

Referenced by checkSlot().

Here is the call graph for this function:

Here is the caller graph for this function:

static int badPointer ( Slot p  )  [static]

Definition at line 130 of file memory-paranoid.C.

References c.

Referenced by checkSlot(), and meta_free().

Here is the caller graph for this function:

static void checkSlot ( Slot s  )  [static]

Definition at line 138 of file memory-paranoid.C.

References badPointer(), checkPad(), Slot::magic, max_allocated, Slot::next, Slot::prev, Slot_toUser(), slotAbort(), and Slot::userSize.

Referenced by freeSlot(), memory_check(), and Slot_fmUser().

Here is the call graph for this function:

Here is the caller graph for this function:

void memory_check ( void   ) 

Definition at line 158 of file memory-paranoid.C.

References checkSlot(), CmiMyPe(), CmiPrintf(), memory_checkphase, memory_verbose, Slot::next, and Slot::userSize.

Referenced by CmiMemoryCheck(), freeSlot(), and setSlot().

Here is the call graph for this function:

Here is the caller graph for this function:

void CmiMemoryMark ( void   ) 

Definition at line 181 of file memory-paranoid.C.

void CmiMemoryMarkBlock ( void *  blk  ) 

Definition at line 182 of file memory-paranoid.C.

void CmiMemorySweep ( const char *  where  ) 

Definition at line 183 of file memory-paranoid.C.

void CmiMemoryCheck ( void   ) 

Definition at line 185 of file memory-paranoid.C.

References memory_check().

Here is the call graph for this function:

static void* setSlot ( Slot s,
int  userSize 
) [static]

static void freeSlot ( Slot s  )  [static]

Definition at line 229 of file memory-paranoid.C.

References checkSlot(), fill_uninit(), Slot::magic, memory_check(), memory_checkfreq, memory_checkphase, Slot::next, Slot::prev, Slot_toUser(), and Slot::userSize.

Here is the call graph for this function:

static Slot* Slot_fmUser ( void *  user  )  [static]

Definition at line 246 of file memory-paranoid.C.

References checkSlot(), and PUP::s.

Here is the call graph for this function:

static void status ( const char *  msg  )  [static]

Definition at line 262 of file memory-paranoid.C.

References CmiArgGivingUsage(), CmiMyPe(), and CmiPrintf().

Here is the call graph for this function:

static void meta_init ( char **  argv  )  [static]

Definition at line 267 of file memory-paranoid.C.

References CmiArgGroup(), CmiGetArgFlagDesc(), CmiGetArgIntDesc(), CmiMemoryIs_flag, CmiMyRank(), memory_checkfreq, memory_fill, memory_fillphase, memory_verbose, and status.

Here is the call graph for this function:

static void* meta_malloc ( size_t  size  )  [static]

Definition at line 303 of file memory-paranoid.C.

References mm_malloc, PUP::s, and setSlot().

Here is the call graph for this function:

static void meta_free ( void *  mem  )  [static]

Definition at line 310 of file memory-paranoid.C.

References badPointer(), CmiGetPageSize(), freeSlot(), Slot::magic, memAbort(), mm_free, and PUP::s.

Here is the call graph for this function:

static void* meta_calloc ( size_t  nelem,
size_t  size 
) [static]

Definition at line 334 of file memory-paranoid.C.

References meta_malloc().

Here is the call graph for this function:

static void meta_cfree ( void *  mem  )  [static]

Definition at line 341 of file memory-paranoid.C.

References meta_free().

Here is the call graph for this function:

static void* meta_realloc ( void *  oldBuffer,
size_t  newSize 
) [static]

Definition at line 346 of file memory-paranoid.C.

References meta_free(), meta_malloc(), size, Slot_fmUser(), and Slot::userSize.

Here is the call graph for this function:

static void* meta_memalign ( size_t  align,
size_t  size 
) [static]

Definition at line 362 of file memory-paranoid.C.

References CmiGetPageSize(), Slot::magic, mm_memalign, PUP::s, and setSlot().

Here is the call graph for this function:

static int meta_posix_memalign ( void **  outptr,
size_t  align,
size_t  size 
) [static]

Definition at line 372 of file memory-paranoid.C.

References CmiGetPageSize(), Slot::magic, mm_posix_memalign, PUP::s, and setSlot().

Here is the call graph for this function:

static void* meta_aligned_alloc ( size_t  align,
size_t  size 
) [static]

Definition at line 386 of file memory-paranoid.C.

References CmiGetPageSize(), Slot::magic, mm_aligned_alloc, PUP::s, and setSlot().

Here is the call graph for this function:

static void* meta_valloc ( size_t  size  )  [static]

Definition at line 396 of file memory-paranoid.C.

References CmiGetPageSize(), and meta_memalign().

Here is the call graph for this function:

static void* meta_pvalloc ( size_t  size  )  [static]

Definition at line 401 of file memory-paranoid.C.

References CmiGetPageSize(), and meta_memalign().

Here is the call graph for this function:


Variable Documentation

size_t max_allocated = 0 [static]

Definition at line 35 of file memory-paranoid.C.

Referenced by checkSlot(), and setSlot().

int memory_fill = -1 [static]

Definition at line 75 of file memory-paranoid.C.

Referenced by fill_uninit(), and meta_init().

int memory_fillphase = 0 [static]

Definition at line 76 of file memory-paranoid.C.

Referenced by fill_uninit(), and meta_init().

Definition at line 95 of file memory-paranoid.C.

int memory_checkfreq = 100 [static]

Definition at line 100 of file memory-paranoid.C.

Referenced by checkPad(), freeSlot(), meta_init(), setSlot(), and slotAbort().

int memory_checkphase = 0 [static]

Definition at line 101 of file memory-paranoid.C.

Referenced by freeSlot(), memory_check(), and setSlot().

int memory_verbose = 0 [static]

Definition at line 102 of file memory-paranoid.C.

Referenced by memory_check(), and meta_init().

int memoryTraceDisabled = 0 [static]

Definition at line 192 of file memory-paranoid.C.


Generated on Mon Sep 21 08:02:25 2020 for Charm++ by  doxygen 1.5.5