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 Slot * | Slot_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 |
Definition at line 63 of file memory-paranoid.C.
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().
static void setPad | ( | char * | pad | ) | [static] |
Definition at line 68 of file memory-paranoid.C.
Referenced by setSlot().
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().
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().
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().
Definition at line 130 of file memory-paranoid.C.
References c.
Referenced by checkSlot(), and meta_free().
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().
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().
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().
Definition at line 195 of file memory-paranoid.C.
References CmiBacktraceRecord(), fill_uninit(), Slot::from, Slot::magic, max_allocated, memory_check(), memory_checkfreq, memory_checkphase, memoryTraceDisabled, n, Slot::next, Slot::prev, setPad(), Slot_toUser(), and Slot::userSize.
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.
static Slot* Slot_fmUser | ( | void * | user | ) | [static] |
Definition at line 246 of file memory-paranoid.C.
References checkSlot(), and PUP::s.
static void status | ( | const char * | msg | ) | [static] |
Definition at line 262 of file memory-paranoid.C.
References CmiArgGivingUsage(), CmiMyPe(), and CmiPrintf().
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.
static void* meta_malloc | ( | size_t | size | ) | [static] |
Definition at line 303 of file memory-paranoid.C.
References mm_malloc, PUP::s, and setSlot().
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.
Definition at line 334 of file memory-paranoid.C.
References meta_malloc().
static void meta_cfree | ( | void * | mem | ) | [static] |
Definition at line 341 of file memory-paranoid.C.
References meta_free().
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.
Definition at line 362 of file memory-paranoid.C.
References CmiGetPageSize(), Slot::magic, mm_memalign, PUP::s, and setSlot().
Definition at line 372 of file memory-paranoid.C.
References CmiGetPageSize(), Slot::magic, mm_posix_memalign, PUP::s, and setSlot().
Definition at line 386 of file memory-paranoid.C.
References CmiGetPageSize(), Slot::magic, mm_aligned_alloc, PUP::s, and setSlot().
static void* meta_valloc | ( | size_t | size | ) | [static] |
Definition at line 396 of file memory-paranoid.C.
References CmiGetPageSize(), and meta_memalign().
static void* meta_pvalloc | ( | size_t | size | ) | [static] |
Definition at line 401 of file memory-paranoid.C.
References CmiGetPageSize(), and meta_memalign().
size_t max_allocated = 0 [static] |
int memory_fill = -1 [static] |
int memory_fillphase = 0 [static] |
Slot slot_first = {&slot_first,&slot_first} [static] |
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] |
int memoryTraceDisabled = 0 [static] |
Definition at line 192 of file memory-paranoid.C.