
Go to the source code of this file.
Functions | |
| CpvStaticDeclare (CmiIsomallocBlockList *, isomalloc_blocklist) | |
| CpvStaticDeclare (CmiIsomallocBlockList *, pushed_blocklist) | |
| void | CmiDisableIsomalloc () |
| void | CmiEnableIsomalloc () |
| 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) |
| void * | malloc_nomigrate (size_t size) |
| void | free_nomigrate (void *mem) |
| CmiIsomallocBlockList * | CmiIsomallocBlockListActivate (CmiIsomallocBlockList *l) |
| CmiIsomallocBlockList * | CmiIsomallocBlockListCurrent () |
Variables | |
| static __thread int | isomalloc_thread = 0 |
| make sure isomalloc is only called in pthreads that is spawned by Charm++. | |
| static int | meta_inited = 0 |
| CpvStaticDeclare | ( | CmiIsomallocBlockList * | , | |
| isomalloc_blocklist | ||||
| ) |
| CpvStaticDeclare | ( | CmiIsomallocBlockList * | , | |
| pushed_blocklist | ||||
| ) |
| void CmiDisableIsomalloc | ( | ) |
Definition at line 35 of file memory-isomalloc.c.
References CmiMyRank(), and rank_holding_CmiMemLock.
| void CmiEnableIsomalloc | ( | ) |
| static void meta_init | ( | char ** | argv | ) | [static] |
Definition at line 65 of file memory-isomalloc.c.
References CmiMemoryIs_flag, CmiNodeAllBarrier(), and isomalloc_thread.
Referenced by CmiMemoryInit(), and cpd_memory_single_pup().
| static void* meta_malloc | ( | size_t | size | ) | [static] |
Definition at line 77 of file memory-isomalloc.c.
References CmiIsFortranLibraryCall(), CmiIsomallocBlockListMalloc(), CmiThreadIs(), isomalloc_thread, and mm_malloc.
| static void meta_free | ( | void * | mem | ) | [static] |
Definition at line 105 of file memory-isomalloc.c.
References CmiIsomallocBlockListFree(), CmiIsomallocInRange(), and mm_free.
Referenced by cpd_memory_single_pup(), free(), free_reentrant(), meta_cfree(), meta_free_hook(), and meta_realloc().
| static void* meta_calloc | ( | size_t | nelem, | |
| size_t | size | |||
| ) | [static] |
| static void meta_cfree | ( | void * | mem | ) | [static] |
Definition at line 124 of file memory-isomalloc.c.
References meta_free().
Referenced by cfree(), and cpd_memory_single_pup().
| static void* meta_realloc | ( | void * | oldBuffer, | |
| size_t | newSize | |||
| ) | [static] |
Definition at line 129 of file memory-isomalloc.c.
References CmiIsomallocInRange(), CmiIsomallocLength(), meta_free(), meta_malloc(), mm_realloc, and size.
| static void* meta_memalign | ( | size_t | align, | |
| size_t | size | |||
| ) | [static] |
Definition at line 151 of file memory-isomalloc.c.
References CmiIsFortranLibraryCall(), CmiIsomallocBlockListMallocAlign(), and mm_memalign.
| static void* meta_valloc | ( | size_t | size | ) | [static] |
| void* malloc_nomigrate | ( | size_t | size | ) |
Definition at line 178 of file memory-isomalloc.c.
| void free_nomigrate | ( | void * | mem | ) |
Definition at line 186 of file memory-isomalloc.c.
| CmiIsomallocBlockList* CmiIsomallocBlockListActivate | ( | CmiIsomallocBlockList * | l | ) |
Definition at line 197 of file memory-isomalloc.c.
Referenced by TCharm::activateThread(), TCharm::deactivateThread(), and KillOnAllSigs().
| CmiIsomallocBlockList* CmiIsomallocBlockListCurrent | ( | ) |
Definition at line 205 of file memory-isomalloc.c.
Referenced by TCharmAPIRoutine::TCharmAPIRoutine().
__thread int isomalloc_thread = 0 [static] |
make sure isomalloc is only called in pthreads that is spawned by Charm++.
It is not safe to call isomalloc in system spawned pthreads for example mpich pthreads, or aio pthreads. Use the following TLS variable to distinguish those pthreads. when set to 1, the current pthreads is allowed to call isomalloc.
Definition at line 56 of file memory-isomalloc.c.
Referenced by meta_init(), and meta_malloc().
int meta_inited = 0 [static] |
Definition at line 63 of file memory-isomalloc.c.
1.5.5