PPL Logo

conv-core/isomalloc.C File Reference

Go to the source code of this file.

Data Structures

struct  CmiIsomallocBlock
struct  _dllnode
struct  _slotblock
struct  _btreenode
struct  _slotset
struct  _insert_ret_val
struct  memRegion_t
struct  _slotmsg
struct  slotOP

Typedefs

typedef struct CmiIsomallocBlock CmiIsomallocBlock
typedef size_t memRange_t
typedef struct _dllnode dllnode
typedef struct _slotblock slotblock
typedef struct _btreenode btreenode
typedef struct _slotset slotset
typedef struct _insert_ret_val insert_ret_val
typedef struct _slotmsg slotmsg
typedef struct slotOP slotOP

Functions

static int read_randomflag (void)
static void * block2pointer (CmiIsomallocBlock *blockHeader)
static CmiIsomallocBlockpointer2block (void *heapBlock)
static void * slot2addr (CmiInt8 slot)
static int slot2pe (CmiInt8 slot)
static CmiInt8 pe2slot (int pe)
static size_t length2slots (size_t nBytes)
static int find_list_bin (CmiInt8 nslots)
static dllnodelist_insert (slotset *ss, slotblock *sb)
static void list_delete (slotset *ss, slotblock *sb)
static void list_move (slotset *ss, dllnode *dlln, CmiInt8 old_nslots)
static btreenodecreate_btree_node ()
static slotblockfind_btree_slotblock (btreenode *node, CmiInt8 startslot)
static void copy_slotblock (slotblock &dst, const slotblock &src)
static void insert_slotblock (slotblock &block, slotset *ss, CmiInt8 startslot, CmiInt8 nslots)
static insert_ret_val btree_insert_int (slotset *ss, btreenode *node, CmiInt8 startslot, CmiInt8 nslots)
static btreenodebtree_insert (slotset *ss, btreenode *node, CmiInt8 startslot, CmiInt8 nslots)
static void btree_delete_int (slotset *ss, btreenode *node, CmiInt8 startslot, slotblock *sb)
static btreenodebtree_delete (slotset *ss, btreenode *node, CmiInt8 startslot)
static slotsetnew_slotset (CmiInt8 startslot, CmiInt8 nslots)
static CmiInt8 get_slots (slotset *ss, CmiInt8 nslots)
static void grab_slots (slotset *ss, CmiInt8 sslot, CmiInt8 nslots)
static void free_slots (slotset *ss, CmiInt8 sslot, CmiInt8 nslots)
static void delete_btree (btreenode *node)
static void delete_list_array (slotset *ss)
static void delete_slotset (slotset *ss)
static void print_btree_node (btreenode *node, int node_num)
static int print_btree_level (btreenode *node, int level, int current_level, int node_num)
static void print_btree_top_down (btreenode *node)
static void print_list_array (slotset *ss)
static void print_slots (slotset *ss)
static void * disabled_map (int nBytes)
static void disabled_unmap (void *bk)
static void disable_isomalloc (const char *why)
static void * call_mmap_fixed (void *addr, size_t len)
static void * call_mmap_anywhere (size_t len)
static void call_munmap (void *addr, size_t len)
static int init_map (char **argv)
 CpvStaticDeclare (int, zerofd)
static void * call_mmap (void *addr, size_t len, int flags)
 Maps this address with these flags.
static CmiIsomallocBlockmap_slots (CmiInt8 slot, CmiInt8 nslots)
 maps the virtual memory associated with slot using mmap
static void unmap_slots (CmiInt8 slot, CmiInt8 nslots)
static void map_failed (CmiInt8 s, CmiInt8 n)
 CpvStaticDeclare (slotset *, myss)
 CtvDeclare (mempool_type *, threadpool)
void * isomallocfn (size_t *size, mem_handle_t *mem_hndl, int expand_flag)
void isofreefn (void *ptr, mem_handle_t mem_hndl)
static void * __cur_stack_frame (void)
static void * __static_data_loc (void)
static int pointer_lt (const char *a, const char *b)
static int pointer_ge (const char *a, const char *b)
static char * pmin (char *a, char *b)
static char * pmax (char *a, char *b)
static int bad_location (char *loc)
static memRange_t divide_range (memRange_t len, int n)
static int partially_good (char *start, memRange_t len, int n)
static int good_range (char *start, memRange_t len, int n)
static void check_range (char *start, char *end, memRegion_t *max)
static memRegion_t find_free_region (memRegion_t *used, int nUsed, int atLeast)
static int find_largest_free_region (memRegion_t *destRegion)
static int try_largest_mmap_region (memRegion_t *destRegion)
static void init_ranges (char **argv)
static slotmsgprepare_slotmsg (CmiInt8 slot, CmiInt8 nslots)
static void grab_remote (slotmsg *msg)
static void free_remote (slotmsg *msg)
static void init_comm (char **argv)
static void one_slotOP (const slotOP *op, int pe, CmiInt8 s, CmiInt8 n)
static void all_slotOP (const slotOP *op, CmiInt8 s, CmiInt8 n)
static CmiIsomallocBlockisomalloc_internal_alloc_block (size_t size, mempool_type *pool)
static CmiIsomallocBlockisomalloc_internal_alloc_block (size_t size)
void * CmiIsomallocFromPool (size_t size, mempool_type *pool) void *CmiIsomallocPlain(int size)
static size_t isomalloc_internal_validate_align (size_t align)
static void * isomalloc_internal_perform_alignment (CmiIsomallocBlock *blk, size_t align, size_t alignoffset)
static void * isomalloc_internal_alloc_aligned (size_t useralign, size_t usersize, size_t blocklistsize, CmiIsomallocBlockList *list)
int CmiIsomallocEnabled (void)
void CmiIsomallocPup (pup_er p, void **blockPtrPtr)
void CmiIsomallocFree (void *blockPtr)
CmiInt8 CmiIsomallocLength (void *block)
int CmiIsomallocInRange (void *addr)
void CmiIsomallocInit (char **argv)
static char * Slot_toUser (CmiIsomallocBlockList *s)
static CmiIsomallocBlockListSlot_fmUser (void *s)
CmiIsomallocBlockListCmiIsomallocBlockListNew (void)
static void print_myslots (void)
void CmiIsomallocBlockListPup (pup_er p, CmiIsomallocBlockList **lp)
void CmiIsomallocBlockListDelete (CmiIsomallocBlockList *l)
void * CmiIsomallocBlockListMalloc (CmiIsomallocBlockList *l, size_t nBytes)
void * CmiIsomallocBlockListMallocAlign (CmiIsomallocBlockList *l, size_t align, size_t nBytes)
void CmiIsomallocBlockListFree (void *block)

Variables

int cutOffPoints [cutOffNum]
int _sync_iso = 0
static int _restart = 0
static int _mmap_probe = 0
static size_t slotsize
static size_t regionSize
static CmiInt8 numslots = 0
static char * isomallocStart = NULL
static char * isomallocEnd = NULL
static int disabled_map_warned = 0
static const memRange_t meg = 1024u*1024u
static const memRange_t gig = 1024u*1024u*1024u
static int grab_remote_idx
static int free_remote_idx
static slotOP grabOP
static slotOP freeOP
int _sync_iso_warned = 0


Typedef Documentation

Definition at line 121 of file isomalloc.C.

typedef size_t memRange_t

Definition at line 132 of file isomalloc.C.

typedef struct _dllnode dllnode

Definition at line 182 of file isomalloc.C.

typedef struct _slotblock slotblock

Definition at line 183 of file isomalloc.C.

typedef struct _btreenode btreenode

Definition at line 191 of file isomalloc.C.

typedef struct _slotset slotset

typedef struct _slotmsg slotmsg

typedef struct slotOP slotOP

Definition at line 1948 of file isomalloc.C.


Function Documentation

static int read_randomflag ( void   )  [static]

Definition at line 84 of file isomalloc.C.

References CmiAbort().

Referenced by CmiIsomallocInit().

Here is the call graph for this function:

Here is the caller graph for this function:

static void* block2pointer ( CmiIsomallocBlock blockHeader  )  [static]

Definition at line 124 of file isomalloc.C.

Referenced by CmiIsomallocFromPool(), CmiIsomallocPup(), and isomalloc_internal_perform_alignment().

Here is the caller graph for this function:

static CmiIsomallocBlock* pointer2block ( void *  heapBlock  )  [static]

Definition at line 127 of file isomalloc.C.

Referenced by CmiIsomallocFree(), CmiIsomallocLength(), CmiIsomallocPup(), and isomalloc_internal_perform_alignment().

Here is the caller graph for this function:

static void* slot2addr ( CmiInt8  slot  )  [static]

Definition at line 148 of file isomalloc.C.

References isomallocStart, and slotsize.

Referenced by map_failed(), map_slots(), and unmap_slots().

Here is the caller graph for this function:

static int slot2pe ( CmiInt8  slot  )  [static]

Definition at line 151 of file isomalloc.C.

References numslots.

Referenced by all_slotOP().

Here is the caller graph for this function:

static CmiInt8 pe2slot ( int  pe  )  [static]

Definition at line 154 of file isomalloc.C.

References numslots.

Referenced by init_ranges(), and one_slotOP().

Here is the caller graph for this function:

static size_t length2slots ( size_t  nBytes  )  [static]

Definition at line 159 of file isomalloc.C.

References slotsize.

Referenced by CmiIsomallocFree(), CmiIsomallocPup(), isomalloc_internal_alloc_block(), and isomallocfn().

Here is the caller graph for this function:

static int find_list_bin ( CmiInt8  nslots  )  [static]

Definition at line 211 of file isomalloc.C.

Referenced by get_slots(), list_delete(), list_insert(), list_move(), and new_slotset().

Here is the caller graph for this function:

static dllnode* list_insert ( slotset ss,
slotblock sb 
) [static]

Definition at line 249 of file isomalloc.C.

References find_list_bin(), _slotset::list_array, malloc_reentrant(), _dllnode::next, _slotblock::nslots, _dllnode::previous, and _dllnode::sb.

Referenced by btree_insert(), btree_insert_int(), and insert_slotblock().

Here is the call graph for this function:

Here is the caller graph for this function:

static void list_delete ( slotset ss,
slotblock sb 
) [static]

Definition at line 274 of file isomalloc.C.

References find_list_bin(), free_reentrant(), _slotset::list_array, _slotblock::listblock, _dllnode::next, _slotblock::nslots, and _dllnode::previous.

Referenced by btree_delete_int().

Here is the call graph for this function:

Here is the caller graph for this function:

static void list_move ( slotset ss,
dllnode dlln,
CmiInt8  old_nslots 
) [static]

Definition at line 299 of file isomalloc.C.

References find_list_bin(), _slotset::list_array, _dllnode::next, _slotblock::nslots, _dllnode::previous, and _dllnode::sb.

Referenced by free_slots(), and grab_slots().

Here is the call graph for this function:

Here is the caller graph for this function:

static btreenode* create_btree_node ( void   )  [static]

Definition at line 333 of file isomalloc.C.

References PUP::b, c, and malloc_reentrant().

Referenced by btree_insert(), btree_insert_int(), and new_slotset().

Here is the call graph for this function:

Here is the caller graph for this function:

static slotblock* find_btree_slotblock ( btreenode node,
CmiInt8  startslot 
) [static]

Definition at line 352 of file isomalloc.C.

References _btreenode::blocks, _btreenode::child, index, _slotblock::nslots, _btreenode::num_blocks, and _slotblock::startslot.

Referenced by find_btree_slotblock(), free_slots(), and grab_slots().

Here is the caller graph for this function:

static void copy_slotblock ( slotblock dst,
const slotblock src 
) [static]

Definition at line 431 of file isomalloc.C.

References _slotblock::listblock, and _dllnode::sb.

Referenced by btree_delete_int(), btree_insert(), and btree_insert_int().

Here is the caller graph for this function:

static void insert_slotblock ( slotblock block,
slotset ss,
CmiInt8  startslot,
CmiInt8  nslots 
) [static]

Definition at line 437 of file isomalloc.C.

References list_insert(), _slotblock::listblock, _slotblock::nslots, and _slotblock::startslot.

Referenced by btree_insert(), and btree_insert_int().

Here is the call graph for this function:

Here is the caller graph for this function:

static insert_ret_val btree_insert_int ( slotset ss,
btreenode node,
CmiInt8  startslot,
CmiInt8  nslots 
) [static]

Definition at line 449 of file isomalloc.C.

References _btreenode::blocks, _insert_ret_val::btn, _btreenode::child, copy_slotblock(), create_btree_node(), index, insert_slotblock(), _btreenode::num_blocks, _insert_ret_val::sb, and _slotblock::startslot.

Referenced by btree_insert(), and btree_insert_int().

Here is the call graph for this function:

Here is the caller graph for this function:

static btreenode* btree_insert ( slotset ss,
btreenode node,
CmiInt8  startslot,
CmiInt8  nslots 
) [static]

Definition at line 572 of file isomalloc.C.

References _btreenode::blocks, _insert_ret_val::btn, btree_insert_int(), _btreenode::child, copy_slotblock(), create_btree_node(), insert_slotblock(), _btreenode::num_blocks, and _insert_ret_val::sb.

Referenced by free_slots(), and grab_slots().

Here is the call graph for this function:

Here is the caller graph for this function:

static void btree_delete_int ( slotset ss,
btreenode node,
CmiInt8  startslot,
slotblock sb 
) [static]

Definition at line 606 of file isomalloc.C.

References _btreenode::blocks, _btreenode::child, copy_slotblock(), free_reentrant(), index, left(), list_delete(), _btreenode::num_blocks, right(), and _slotblock::startslot.

Referenced by btree_delete(), and btree_delete_int().

Here is the call graph for this function:

Here is the caller graph for this function:

static btreenode* btree_delete ( slotset ss,
btreenode node,
CmiInt8  startslot 
) [static]

Definition at line 821 of file isomalloc.C.

References btree_delete_int(), _btreenode::child, free_reentrant(), and _btreenode::num_blocks.

Referenced by free_slots(), and grab_slots().

Here is the call graph for this function:

Here is the caller graph for this function:

static slotset* new_slotset ( CmiInt8  startslot,
CmiInt8  nslots 
) [static]

Definition at line 848 of file isomalloc.C.

References create_btree_node(), find_list_bin(), _slotblock::listblock, malloc_reentrant(), _slotblock::nslots, and _slotblock::startslot.

Referenced by init_ranges().

Here is the call graph for this function:

Here is the caller graph for this function:

static CmiInt8 get_slots ( slotset ss,
CmiInt8  nslots 
) [static]

Definition at line 884 of file isomalloc.C.

References find_list_bin(), _slotset::list_array, _dllnode::next, _slotblock::nslots, _dllnode::sb, and _slotblock::startslot.

Referenced by isomalloc_internal_alloc_block(), and isomallocfn().

Here is the call graph for this function:

Here is the caller graph for this function:

static void grab_slots ( slotset ss,
CmiInt8  sslot,
CmiInt8  nslots 
) [static]

Definition at line 914 of file isomalloc.C.

References btree_delete(), btree_insert(), _slotset::btree_root, CmiAbort(), find_btree_slotblock(), list_move(), _slotblock::listblock, _slotblock::nslots, and _slotblock::startslot.

Referenced by grab_remote(), init_comm(), isomalloc_internal_alloc_block(), and isomallocfn().

Here is the call graph for this function:

Here is the caller graph for this function:

static void free_slots ( slotset ss,
CmiInt8  sslot,
CmiInt8  nslots 
) [static]

Definition at line 967 of file isomalloc.C.

References btree_delete(), btree_insert(), _slotset::btree_root, find_btree_slotblock(), list_move(), _slotblock::listblock, _slotblock::nslots, and _slotblock::startslot.

Referenced by free_remote(), and init_comm().

Here is the call graph for this function:

Here is the caller graph for this function:

static void delete_btree ( btreenode node  )  [static]

Definition at line 1016 of file isomalloc.C.

References _btreenode::child, free_reentrant(), and _btreenode::num_blocks.

Referenced by delete_btree(), and delete_slotset().

Here is the call graph for this function:

Here is the caller graph for this function:

static void delete_list_array ( slotset ss  )  [static]

Definition at line 1036 of file isomalloc.C.

References free_reentrant(), _slotset::list_array, _dllnode::next, and _dllnode::previous.

Referenced by delete_slotset().

Here is the call graph for this function:

Here is the caller graph for this function:

static void delete_slotset ( slotset ss  )  [static]

Definition at line 1061 of file isomalloc.C.

References _slotset::btree_root, delete_btree(), delete_list_array(), and free_reentrant().

Here is the call graph for this function:

static void print_btree_node ( btreenode node,
int  node_num 
) [static]

Definition at line 1075 of file isomalloc.C.

References _btreenode::blocks, CmiPrintf(), _slotblock::nslots, _btreenode::num_blocks, and _slotblock::startslot.

Referenced by print_btree_level().

Here is the call graph for this function:

Here is the caller graph for this function:

static int print_btree_level ( btreenode node,
int  level,
int  current_level,
int  node_num 
) [static]

Definition at line 1085 of file isomalloc.C.

References _btreenode::child, _btreenode::num_blocks, and print_btree_node().

Referenced by print_btree_level(), and print_btree_top_down().

Here is the call graph for this function:

Here is the caller graph for this function:

static void print_btree_top_down ( btreenode node  )  [static]

Definition at line 1104 of file isomalloc.C.

References CmiPrintf(), level, and print_btree_level().

Referenced by print_slots().

Here is the call graph for this function:

Here is the caller graph for this function:

static void print_list_array ( slotset ss  )  [static]

Definition at line 1122 of file isomalloc.C.

References CmiPrintf(), _slotset::list_array, _dllnode::next, _slotblock::nslots, _dllnode::previous, _dllnode::sb, and _slotblock::startslot.

Referenced by print_slots().

Here is the call graph for this function:

Here is the caller graph for this function:

static void print_slots ( slotset ss  )  [static]

Definition at line 1145 of file isomalloc.C.

References _slotset::btree_root, print_btree_top_down(), and print_list_array().

Referenced by print_myslots().

Here is the call graph for this function:

Here is the caller graph for this function:

static void* disabled_map ( int  nBytes  )  [static]

Definition at line 1157 of file isomalloc.C.

References CmiError(), CmiMyPe(), and malloc().

Referenced by isomalloc_internal_alloc_block().

Here is the call graph for this function:

Here is the caller graph for this function:

static void disabled_unmap ( void *  bk  )  [static]

Definition at line 1167 of file isomalloc.C.

References free().

Referenced by CmiIsomallocFree().

Here is the call graph for this function:

Here is the caller graph for this function:

static void disable_isomalloc ( const char *  why  )  [static]

Definition at line 1172 of file isomalloc.C.

References CmiMyPe(), CmiPrintf(), isomallocEnd, and isomallocStart.

Referenced by CmiIsomallocInit(), and init_ranges().

Here is the call graph for this function:

Here is the caller graph for this function:

static void * call_mmap_fixed ( void *  addr,
size_t  len 
) [static]

Definition at line 1182 of file isomalloc.C.

References CmiAbort().

Referenced by bad_location(), and map_slots().

Here is the call graph for this function:

Here is the caller graph for this function:

static void * call_mmap_anywhere ( size_t  len  )  [static]

Definition at line 1186 of file isomalloc.C.

References CmiAbort().

Referenced by find_largest_free_region().

Here is the call graph for this function:

Here is the caller graph for this function:

static void call_munmap ( void *  addr,
size_t  len 
) [static]

Definition at line 1190 of file isomalloc.C.

References CmiAbort().

Referenced by bad_location(), find_largest_free_region(), isofreefn(), map_slots(), try_largest_mmap_region(), and unmap_slots().

Here is the call graph for this function:

Here is the caller graph for this function:

static int init_map ( char **  argv  )  [static]

Definition at line 1195 of file isomalloc.C.

Referenced by CmiIsomallocInit().

Here is the caller graph for this function:

CpvStaticDeclare ( int  ,
zerofd   
)

static void* call_mmap ( void *  addr,
size_t  len,
int  flags 
) [static]

Maps this address with these flags.

Definition at line 1213 of file isomalloc.C.

static CmiIsomallocBlock* map_slots ( CmiInt8  slot,
CmiInt8  nslots 
) [static]

maps the virtual memory associated with slot using mmap

Definition at line 1260 of file isomalloc.C.

References call_mmap_fixed(), call_munmap(), CmiMyPe(), slot2addr(), and slotsize.

Referenced by CmiIsomallocBlockListPup(), CmiIsomallocPup(), isomalloc_internal_alloc_block(), and isomallocfn().

Here is the call graph for this function:

Here is the caller graph for this function:

static void unmap_slots ( CmiInt8  slot,
CmiInt8  nslots 
) [static]

Definition at line 1285 of file isomalloc.C.

References call_munmap(), CmiMyPe(), slot2addr(), and slotsize.

Referenced by CmiIsomallocFree(), and CmiIsomallocPup().

Here is the call graph for this function:

Here is the caller graph for this function:

static void map_failed ( CmiInt8  s,
CmiInt8  n 
) [static]

Definition at line 1292 of file isomalloc.C.

References CmiAbort(), CmiError(), slot2addr(), and slotsize.

Referenced by CmiIsomallocPup(), isomalloc_internal_alloc_block(), and isomallocfn().

Here is the call graph for this function:

Here is the caller graph for this function:

CpvStaticDeclare ( slotset ,
myss   
)

CtvDeclare ( mempool_type ,
threadpool   
)

void* isomallocfn ( size_t size,
mem_handle_t mem_hndl,
int  expand_flag 
)

Definition at line 1310 of file isomalloc.C.

References CmiAbort(), CmiError(), CmiMyPe(), get_slots(), grab_slots(), length2slots(), map_failed(), map_slots(), n, PUP::s, and slotsize.

Referenced by CmiIsomallocBlockListNew().

Here is the call graph for this function:

Here is the caller graph for this function:

void isofreefn ( void *  ptr,
mem_handle_t  mem_hndl 
)

Definition at line 1338 of file isomalloc.C.

References call_munmap(), and size.

Referenced by CmiIsomallocBlockListNew().

Here is the call graph for this function:

Here is the caller graph for this function:

static void* __cur_stack_frame ( void   )  [static]

Definition at line 1352 of file isomalloc.C.

Referenced by find_largest_free_region().

Here is the caller graph for this function:

static void* __static_data_loc ( void   )  [static]

Definition at line 1359 of file isomalloc.C.

Referenced by find_largest_free_region().

Here is the caller graph for this function:

static int pointer_lt ( const char *  a,
const char *  b 
) [static]

Definition at line 1368 of file isomalloc.C.

Referenced by CmiIsomallocInRange(), find_free_region(), pmax(), and pmin().

Here is the caller graph for this function:

static int pointer_ge ( const char *  a,
const char *  b 
) [static]

Definition at line 1371 of file isomalloc.C.

Referenced by CmiIsomallocInRange().

Here is the caller graph for this function:

static char* pmin ( char *  a,
char *  b 
) [static]

Definition at line 1375 of file isomalloc.C.

References pointer_lt().

Referenced by check_range(), and find_free_region().

Here is the call graph for this function:

Here is the caller graph for this function:

static char* pmax ( char *  a,
char *  b 
) [static]

Definition at line 1376 of file isomalloc.C.

References pointer_lt().

Referenced by find_free_region().

Here is the call graph for this function:

Here is the caller graph for this function:

static int bad_location ( char *  loc  )  [static]

Definition at line 1384 of file isomalloc.C.

References call_mmap_fixed(), call_munmap(), CmiMyPe(), and slotsize.

Referenced by good_range(), and partially_good().

Here is the call graph for this function:

Here is the caller graph for this function:

static memRange_t divide_range ( memRange_t  len,
int  n 
) [static]

Definition at line 1396 of file isomalloc.C.

Referenced by check_range(), good_range(), and partially_good().

Here is the caller graph for this function:

static int partially_good ( char *  start,
memRange_t  len,
int  n 
) [static]

Definition at line 1401 of file isomalloc.C.

References bad_location(), and divide_range().

Referenced by check_range().

Here is the call graph for this function:

Here is the caller graph for this function:

static int good_range ( char *  start,
memRange_t  len,
int  n 
) [static]

Definition at line 1412 of file isomalloc.C.

References bad_location(), and divide_range().

Referenced by check_range(), and try_largest_mmap_region().

Here is the call graph for this function:

Here is the caller graph for this function:

static void check_range ( char *  start,
char *  end,
memRegion_t max 
) [static]

Definition at line 1427 of file isomalloc.C.

References CmiMyPe(), divide_range(), good_range(), memRegion_t::len, n, partially_good(), pmin(), memRegion_t::start, and memRegion_t::type.

Referenced by find_free_region().

Here is the call graph for this function:

Here is the caller graph for this function:

static memRegion_t find_free_region ( memRegion_t used,
int  nUsed,
int  atLeast 
) [static]

Definition at line 1483 of file isomalloc.C.

References check_range(), memRegion_t::len, max(), pmax(), pmin(), pointer_lt(), and memRegion_t::start.

Referenced by find_largest_free_region().

Here is the call graph for this function:

Here is the caller graph for this function:

static int find_largest_free_region ( memRegion_t destRegion  )  [static]

Definition at line 1514 of file isomalloc.C.

References __cur_stack_frame(), __static_data_loc(), call_mmap_anywhere(), call_munmap(), CmiMyPe(), find_free_region(), free(), memRegion_t::len, malloc(), p, memRegion_t::start, and memRegion_t::type.

Referenced by init_ranges().

Here is the call graph for this function:

Here is the caller graph for this function:

static int try_largest_mmap_region ( memRegion_t destRegion  )  [static]

Definition at line 1592 of file isomalloc.C.

References call_munmap(), CmiMyPe(), count, good_range(), PUP::l, memRegion_t::len, PUP::s, size, size_t, and memRegion_t::start.

Referenced by init_ranges().

Here is the call graph for this function:

Here is the caller graph for this function:

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

static slotmsg* prepare_slotmsg ( CmiInt8  slot,
CmiInt8  nslots 
) [static]

Definition at line 1920 of file isomalloc.C.

References CmiAlloc(), CmiMyPe(), PUP::m, _slotmsg::nslots, _slotmsg::pe, and _slotmsg::slot.

Referenced by one_slotOP().

Here is the call graph for this function:

Here is the caller graph for this function:

static void grab_remote ( slotmsg msg  )  [static]

Definition at line 1929 of file isomalloc.C.

References CmiFree(), grab_slots(), _slotmsg::nslots, and _slotmsg::slot.

Referenced by init_comm().

Here is the call graph for this function:

Here is the caller graph for this function:

static void free_remote ( slotmsg msg  )  [static]

Definition at line 1935 of file isomalloc.C.

References CmiFree(), free_slots(), _slotmsg::nslots, and _slotmsg::slot.

Referenced by init_comm().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 1951 of file isomalloc.C.

References CmiAssignOnce(), CmiRegisterHandler(), free_remote(), free_slots(), grab_remote(), grab_slots(), slotOP::local, and slotOP::remote.

Here is the call graph for this function:

static void one_slotOP ( const slotOP op,
int  pe,
CmiInt8  s,
CmiInt8  n 
) [static]

Definition at line 1963 of file isomalloc.C.

References CmiMyPe(), Converse::CmiSyncSendAndFree(), slotOP::local, PUP::m, pe2slot(), prepare_slotmsg(), and slotOP::remote.

Referenced by all_slotOP().

Here is the call graph for this function:

Here is the caller graph for this function:

static void all_slotOP ( const slotOP op,
CmiInt8  s,
CmiInt8  n 
) [static]

Definition at line 1988 of file isomalloc.C.

References one_slotOP(), and slot2pe().

Referenced by CmiIsomallocFree(), and CmiIsomallocPup().

Here is the call graph for this function:

Here is the caller graph for this function:

static CmiIsomallocBlock* isomalloc_internal_alloc_block ( size_t  size,
mempool_type pool 
) [static]

Definition at line 1998 of file isomalloc.C.

References mempool_malloc(), and CmiIsomallocBlock::slot.

Referenced by CmiIsomallocFromPool(), and isomalloc_internal_alloc_aligned().

Here is the call graph for this function:

Here is the caller graph for this function:

static CmiIsomallocBlock* isomalloc_internal_alloc_block ( size_t  size  )  [static]

Definition at line 2005 of file isomalloc.C.

References CmiAbort(), CmiError(), CmiMyPe(), disabled_map(), get_slots(), grab_slots(), isomallocStart, length2slots(), map_failed(), map_slots(), n, PUP::s, and CmiIsomallocBlock::slot.

Here is the call graph for this function:

void* CmiIsomallocFromPool ( size_t  size,
mempool_type pool 
)

Definition at line 2034 of file isomalloc.C.

References CmiIsomallocBlock::align, CmiIsomallocBlock::alignoffset, block2pointer(), isomalloc_internal_alloc_block(), and CmiIsomallocBlock::length.

Referenced by CmiIsomallocBlockListMalloc(), and CmiIsomallocBlockListNew().

Here is the call graph for this function:

Here is the caller graph for this function:

static size_t isomalloc_internal_validate_align ( size_t  align  )  [static]

Definition at line 2053 of file isomalloc.C.

References PUP::a.

Referenced by isomalloc_internal_alloc_aligned().

Here is the caller graph for this function:

static void* isomalloc_internal_perform_alignment ( CmiIsomallocBlock blk,
size_t  align,
size_t  alignoffset 
) [static]

Definition at line 2065 of file isomalloc.C.

References block2pointer(), and pointer2block().

Referenced by CmiIsomallocPup(), and isomalloc_internal_alloc_aligned().

Here is the call graph for this function:

Here is the caller graph for this function:

static void* isomalloc_internal_alloc_aligned ( size_t  useralign,
size_t  usersize,
size_t  blocklistsize,
CmiIsomallocBlockList list 
) [static]

int CmiIsomallocEnabled ( void   ) 

Definition at line 2096 of file isomalloc.C.

References isomallocStart.

Referenced by checkAddress(), CmiIsomallocMallocAlignForThread(), CmiIsomallocMallocForThread(), and CthAllocateStack().

Here is the caller graph for this function:

void CmiIsomallocPup ( pup_er  p,
void **  blockPtrPtr 
)

void CmiIsomallocFree ( void *  blockPtr  ) 

Definition at line 2152 of file isomalloc.C.

References all_slotOP(), disabled_unmap(), isomallocStart, CmiIsomallocBlock::length, length2slots(), mempool_free_thread(), n, pointer2block(), PUP::s, CmiIsomallocBlock::slot, and unmap_slots().

Referenced by CmiIsomallocBlockListDelete(), and CmiIsomallocBlockListFree().

Here is the call graph for this function:

Here is the caller graph for this function:

CmiInt8 CmiIsomallocLength ( void *  block  ) 

Definition at line 2172 of file isomalloc.C.

References CmiIsomallocBlock::length, and pointer2block().

Referenced by meta_realloc().

Here is the call graph for this function:

Here is the caller graph for this function:

int CmiIsomallocInRange ( void *  addr  ) 

Definition at line 2178 of file isomalloc.C.

References isomallocEnd, isomallocStart, pointer_ge(), and pointer_lt().

Referenced by checkAddress(), meta_free(), and meta_realloc().

Here is the call graph for this function:

Here is the caller graph for this function:

static char* Slot_toUser ( CmiIsomallocBlockList s  )  [static]

Definition at line 2237 of file isomalloc.C.

Referenced by checkSlot(), CmiIsomallocBlockListMalloc(), CmiIsomallocBlockListMallocAlign(), freeSlot(), printSlot(), setSlot(), and slotAbort().

Here is the caller graph for this function:

static CmiIsomallocBlockList* Slot_fmUser ( void *  s  )  [static]

Definition at line 2238 of file isomalloc.C.

Referenced by CmiIsomallocBlockListFree(), CmiMemoryMarkBlock(), and meta_realloc().

Here is the caller graph for this function:

CmiIsomallocBlockList* CmiIsomallocBlockListNew ( void   ) 

static void print_myslots ( void   )  [static]

Definition at line 2515 of file isomalloc.C.

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

Here is the call graph for this function:

void CmiIsomallocBlockListPup ( pup_er  p,
CmiIsomallocBlockList **  lp 
)

void CmiIsomallocBlockListDelete ( CmiIsomallocBlockList l  ) 

Definition at line 2448 of file isomalloc.C.

References CmiIsomallocFree(), mempool_destroy(), CmiIsomallocBlockList::next, and CmiIsomallocBlockList::pool.

Referenced by TCharm::clear(), CthThreadBaseFree(), ArmciVirtualProcessor::~ArmciVirtualProcessor(), and TCharm::~TCharm().

Here is the call graph for this function:

Here is the caller graph for this function:

void* CmiIsomallocBlockListMalloc ( CmiIsomallocBlockList l,
size_t  nBytes 
)

Definition at line 2470 of file isomalloc.C.

References CmiIsomallocFromPool(), n, CmiIsomallocBlockList::next, CmiIsomallocBlockList::pool, CmiIsomallocBlockList::prev, and Slot_toUser().

Referenced by ArmciVirtualProcessor::BlockMalloc(), CmiIsomallocMallocForThread(), CthAllocateStack(), and meta_malloc().

Here is the call graph for this function:

Here is the caller graph for this function:

void* CmiIsomallocBlockListMallocAlign ( CmiIsomallocBlockList l,
size_t  align,
size_t  nBytes 
)

Definition at line 2487 of file isomalloc.C.

References isomalloc_internal_alloc_aligned(), n, CmiIsomallocBlockList::next, CmiIsomallocBlockList::prev, and Slot_toUser().

Referenced by CmiIsomallocMallocAlignForThread(), CthAllocateStack(), meta_aligned_alloc(), meta_memalign(), and meta_posix_memalign().

Here is the call graph for this function:

Here is the caller graph for this function:

void CmiIsomallocBlockListFree ( void *  block  ) 

Definition at line 2500 of file isomalloc.C.

References CmiAbort(), CmiIsomallocFree(), n, CmiIsomallocBlockList::next, CmiIsomallocBlockList::prev, and Slot_fmUser().

Referenced by ARMCI_Free(), ARMCI_Free_local(), meta_free(), and CtgGlobalStruct::~CtgGlobalStruct().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

int cutOffPoints[cutOffNum]

Definition at line 38 of file mempool.C.

Referenced by checkblock(), fillblock(), mempool_free(), mempool_malloc(), and which_pow2().

Definition at line 78 of file isomalloc.C.

Referenced by CmiIsomallocInit(), init_ranges(), and meta_init().

int _restart = 0 [static]

Definition at line 80 of file isomalloc.C.

Referenced by CmiIsomallocInit(), and init_ranges().

int _mmap_probe = 0 [static]

Definition at line 82 of file isomalloc.C.

Referenced by CmiIsomallocInit(), and init_ranges().

size_t slotsize [static]

size_t regionSize [static]

Definition at line 136 of file isomalloc.C.

CmiInt8 numslots = 0 [static]

Definition at line 139 of file isomalloc.C.

Referenced by init_ranges(), pe2slot(), and slot2pe().

char* isomallocStart = NULL [static]

char* isomallocEnd = NULL [static]

Definition at line 145 of file isomalloc.C.

Referenced by CmiIsomallocInRange(), disable_isomalloc(), and init_ranges().

int disabled_map_warned = 0 [static]

Definition at line 1156 of file isomalloc.C.

const memRange_t meg = 1024u*1024u [static]

Definition at line 1378 of file isomalloc.C.

const memRange_t gig = 1024u*1024u*1024u [static]

Definition at line 1379 of file isomalloc.C.

int grab_remote_idx [static]

Definition at line 1940 of file isomalloc.C.

int free_remote_idx [static]

Definition at line 1940 of file isomalloc.C.

slotOP grabOP [static]

Definition at line 1949 of file isomalloc.C.

slotOP freeOP [static]

Definition at line 1949 of file isomalloc.C.

Definition at line 2185 of file isomalloc.C.

Referenced by meta_init().


Generated on Mon Sep 21 08:01:58 2020 for Charm++ by  doxygen 1.5.5