
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... | |
| struct | _SlotStack |
Typedefs | |
| typedef struct _Slot | Slot |
| typedef struct _SlotStack | SlotStack |
Functions | |
| static void * | meta_malloc (size_t size) |
| static void * | meta_calloc (size_t nelem, size_t size) |
| 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) |
| int | get_memory_allocated_user_total () |
| static char * | SlotToUser (Slot *s) |
| static Slot * | UserToSlot (void *user) |
| static int | isLeakSlot (Slot *s) |
| static int | isProtected (Slot *s) |
| int | Slot_ChareOwner (void *s) |
| int | Slot_AllocatedSize (void *s) |
| int | Slot_StackTrace (void *s, void ***stack) |
| static void | printSlot (Slot *s) |
| size_t | cpd_memory_length (void *lenParam) |
| Returns the number of total blocks of memory allocated. | |
| void | cpd_memory_single_pup (CkHashtable_c h, pup_er p) |
| PUP a single slot of memory for the debugger. | |
Variables | |
| int | nextChareID |
| int | memory_chare_id |
| int | memory_charmdebug_internal = 0 |
| CkHashtable_c | block_slots = NULL |
| Slot | slot_first_storage = {&slot_first_storage, &slot_first_storage} |
| Slot * | slot_first = &slot_first_storage |
| int | memory_allocated_user_total |
| void * | lastMemoryAllocated = NULL |
| Slot ** | allocatedSince = NULL |
| int | allocatedSinceSize = 0 |
| int | allocatedSinceMaxSize = 0 |
| int | saveAllocationHistory = 0 |
Definition at line 38 of file memory-charmdebug.c.
| typedef struct _SlotStack SlotStack |
Definition at line 39 of file memory-charmdebug.c.
| static void* meta_malloc | ( | size_t | size | ) | [static] |
Definition at line 27 of file memory-lock.c.
Referenced by cpd_memory_single_pup(), malloc(), malloc_reentrant(), meta_calloc(), meta_malloc_hook(), meta_realloc(), and meta_valloc().
| static void* meta_calloc | ( | size_t | nelem, | |
| size_t | size | |||
| ) | [static] |
Definition at line 40 of file memory-lock.c.
References CmiOutOfMemory(), and mm_calloc.
Referenced by calloc(), and cpd_memory_single_pup().
| static void* meta_realloc | ( | void * | oldBuffer, | |
| size_t | newSize | |||
| ) | [static] |
Definition at line 53 of file memory-lock.c.
Referenced by cpd_memory_single_pup(), meta_realloc_hook(), and realloc().
| static void* meta_memalign | ( | size_t | align, | |
| size_t | size | |||
| ) | [static] |
Definition at line 60 of file memory-lock.c.
Referenced by cpd_memory_single_pup(), memalign(), meta_memalign_hook(), and meta_valloc().
| static void* meta_valloc | ( | size_t | size | ) | [static] |
Definition at line 68 of file memory-lock.c.
References CmiOutOfMemory(), and mm_valloc.
Referenced by cpd_memory_single_pup(), and valloc().
| int get_memory_allocated_user_total | ( | ) |
Definition at line 113 of file memory-charmdebug.c.
| static char* SlotToUser | ( | Slot * | s | ) | [static] |
Definition at line 122 of file memory-charmdebug.c.
Referenced by cpd_memory_single_pup(), and printSlot().
| static Slot* UserToSlot | ( | void * | user | ) | [static] |
Definition at line 133 of file memory-charmdebug.c.
References block_slots, CkHashtableGet(), and s.
Referenced by cpd_memory_single_pup().
Definition at line 143 of file memory-charmdebug.c.
References Slot::magic.
Referenced by cpd_memory_single_pup().
Definition at line 147 of file memory-charmdebug.c.
References Slot::magic.
Referenced by cpd_memory_single_pup().
| int Slot_ChareOwner | ( | void * | s | ) |
| int Slot_AllocatedSize | ( | void * | s | ) |
Definition at line 155 of file memory-charmdebug.c.
| int Slot_StackTrace | ( | void * | s, | |
| void *** | stack | |||
| ) |
| static void printSlot | ( | Slot * | s | ) | [static] |
Definition at line 164 of file memory-charmdebug.c.
References CmiBacktracePrint(), CmiMyPe(), CmiPrintf(), Slot::from, SlotToUser(), and Slot::userSize.
Referenced by CmiMemorySweep().
| size_t cpd_memory_length | ( | void * | lenParam | ) |
Returns the number of total blocks of memory allocated.
Definition at line 173 of file memory-charmdebug.c.
References block_slots, CkHashtableSize(), n, and Slot::next.
| void cpd_memory_single_pup | ( | CkHashtable_c | h, | |
| pup_er | p | |||
| ) |
PUP a single slot of memory for the debugger.
This includes the information about the slot (like size and location), but not the allocated data itself.
PUP the entire information about the allocated memory to the debugger
Returns the content of a block of memory (i.e the user data). This request must always be at the beginning of an allocated block (not for example an object part of an array)
Perform a scan of all the memory to find all the memory that is reacheable from either the stack or the global variables.
Called before the entry method: resets all current memory for the chare receiving the message.
Called after the entry method to check if the chare that just received the message has corrupted the memory of some other chare, or some system memory.
Definition at line 190 of file memory-charmdebug.c.
References LeakSearchInfo::begin_bss, LeakSearchInfo::begin_data, block_slots, check_memory_leaks(), CkCreateHashtable_pointer(), CkDeleteHashtable(), CkHashtableGet(), CkHashtableGetIterator(), CkHashtableIteratorNext(), CkHashtableIteratorSeekStart(), CkHashtablePut(), CkHashtableRemove(), CmiAbort(), CmiArgGivingUsage(), CmiBacktraceRecordHuge(), CmiFree(), CmiGetArgFlagDesc(), CmiMemoryIs_flag, CmiMyPe(), CmiPrintf(), CPD_CROSSCORRUPTION, cpd_memory_get(), cpd_memory_getLength(), cpd_memory_pup(), CpdCheckMemory(), CpdDebug_deleteAllocationPoint, CpdDebug_deleteMemStat, CpdDebug_MergeAllocationTree, CpdDebug_mergeMemStat, CpdDebug_pupAllocationPoint, CpdDebug_pupMemStat, CpdDebugGetAllocationTree, CpdDebugGetMemStat, CpdFreeze(), cpdInSystem, CpdListBeginItem(), CpdMemoryMarkClean(), CpdNotify(), CpdResetMemory(), CpdSetInitializeMemory(), CpdSystemEnter(), CpdSystemExit(), crc32_initial(), crc32_update(), data, LeakSearchInfo::end_bss, LeakSearchInfo::end_data, freeSlot(), Slot::from, getCharmEnvelopeSize(), getpagesize(), CpdListItemsRequest::hi, idx, isLeakSlot(), isProtected(), lastMemoryAllocated, list, CpdListItemsRequest::lo, Slot::magic, mem, memory_stack_top, memory_status_info, memoryBackup, MemoryToSlot(), meta_calloc(), meta_cfree(), meta_free(), meta_getpagesize(), meta_init(), meta_malloc(), meta_memalign(), meta_realloc(), meta_valloc(), mm_calloc, mm_free, mm_malloc, mm_memalign, msg, Slot::next, PCQueueCreate(), PCQueueDestroy(), PCQueuePop(), Slot::prev, printf(), ptr, pup_bytes(), pup_comment(), pup_destroy(), pup_fmt_sync_begin_array(), pup_fmt_sync_begin_object(), pup_fmt_sync_end_array(), pup_fmt_sync_end_object(), pup_fmt_sync_item(), pup_isPacking(), pup_isUnpacking(), pup_new_fromMem(), pup_pointers(), pup_sync_begin_array, pup_sync_end_array, pup_syncComment(), LeakSearchInfo::quick, s, setMemoryChareID(), setMemoryChareIDFromPtr(), setMemoryOwnedBy(), setMemoryTypeChare(), setMemoryTypeMessage(), setProtection(), setSlot(), size, sizes, SlotToUser(), status(), traceFree_c(), traceMalloc_c(), Slot::userSize, and UserToSlot().
Definition at line 41 of file memory-charmdebug.c.
Definition at line 44 of file memory-charmdebug.c.
| CkHashtable_c block_slots = NULL |
Definition at line 106 of file memory-charmdebug.c.
Referenced by cpd_memory_length(), cpd_memory_single_pup(), and UserToSlot().
Definition at line 108 of file memory-charmdebug.c.
Definition at line 109 of file memory-charmdebug.c.
Definition at line 112 of file memory-charmdebug.c.
| void* lastMemoryAllocated = NULL |
| Slot** allocatedSince = NULL |
Definition at line 116 of file memory-charmdebug.c.
Definition at line 117 of file memory-charmdebug.c.
Definition at line 118 of file memory-charmdebug.c.
Definition at line 119 of file memory-charmdebug.c.
1.5.5