
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 (char *pad, char *errMsg, 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 int | meta_getpagesize (void) |
| static void | status (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 void * | meta_valloc (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] |
| static void fill_uninit | ( | char * | loc, | |
| int | len | |||
| ) | [static] |
| 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(), Slot_toUser(), and Slot::userSize.
Referenced by checkPad(), and checkSlot().
| static void checkPad | ( | char * | pad, | |
| char * | errMsg, | |||
| void * | ptr, | |||
| Slot * | s | |||
| ) | [static] |
Definition at line 113 of file memory-paranoid.c.
References 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(), 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 195 of file memory-paranoid.c.
References CmiBacktraceRecord(), fill_uninit(), Slot::from, Slot::magic, max_allocated, memory_check(), 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(), Slot::next, Slot::prev, Slot_toUser(), and Slot::userSize.
| static Slot* Slot_fmUser | ( | void * | user | ) | [static] |
| static int meta_getpagesize | ( | void | ) | [static] |
| static void status | ( | char * | msg | ) | [static] |
Definition at line 278 of file memory-paranoid.c.
References CmiArgGivingUsage(), CmiMyPe(), and CmiPrintf().
| static void meta_init | ( | char ** | argv | ) | [static] |
Definition at line 283 of file memory-paranoid.c.
References CmiArgGroup(), CmiGetArgFlagDesc(), CmiGetArgIntDesc(), CmiMemoryIs_flag, and status().
| static void* meta_malloc | ( | size_t | size | ) | [static] |
| static void meta_free | ( | void * | mem | ) | [static] |
Definition at line 314 of file memory-paranoid.c.
References badPointer(), freeSlot(), Slot::magic, memAbort(), meta_getpagesize(), mm_free, and s.
| static void* meta_calloc | ( | size_t | nelem, | |
| size_t | size | |||
| ) | [static] |
| static void meta_cfree | ( | void * | mem | ) | [static] |
| static void* meta_realloc | ( | void * | oldBuffer, | |
| size_t | newSize | |||
| ) | [static] |
Definition at line 350 of file memory-paranoid.c.
References meta_free(), meta_malloc(), size, Slot_fmUser(), and Slot::userSize.
| static void* meta_memalign | ( | size_t | align, | |
| size_t | size | |||
| ) | [static] |
Definition at line 366 of file memory-paranoid.c.
References Slot::magic, meta_getpagesize(), mm_memalign, s, and setSlot().
| static void* meta_valloc | ( | size_t | size | ) | [static] |
Definition at line 375 of file memory-paranoid.c.
References meta_getpagesize(), and meta_memalign().
size_t max_allocated = 0 [static] |
int memory_fill = -1 [static] |
Definition at line 75 of file memory-paranoid.c.
int memory_fillphase = 0 [static] |
Definition at line 76 of file memory-paranoid.c.
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.
int memory_checkphase = 0 [static] |
Definition at line 101 of file memory-paranoid.c.
int memory_verbose = 0 [static] |
Definition at line 102 of file memory-paranoid.c.
int memoryTraceDisabled = 0 [static] |
Definition at line 192 of file memory-paranoid.c.
1.5.5