
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 | _slotblock |
| struct | _slotset |
| 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 CmiIsomallocBlock * | pointer2block (void *heapBlock) |
| static void * | slot2addr (CmiInt8 slot) |
| static int | slot2pe (CmiInt8 slot) |
| static CmiInt8 | pe2slot (int pe) |
| static int | length2slots (int nBytes) |
| static int | find_list_bin (CmiInt8 nslots) |
| static dllnode * | list_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 btreenode * | create_btree_node () |
| static slotblock * | find_btree_slotblock (btreenode *node, CmiInt8 startslot) |
| static insert_ret_val | btree_insert_int (slotset *ss, btreenode *node, CmiInt8 startslot, CmiInt8 nslots) |
| static btreenode * | btree_insert (slotset *ss, btreenode *node, CmiInt8 startslot, CmiInt8 nslots) |
| static void | btree_delete_int (slotset *ss, btreenode *node, CmiInt8 startslot, slotblock *sb) |
| static btreenode * | btree_delete (slotset *ss, btreenode *node, CmiInt8 startslot) |
| static slotset * | new_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 | add_slots (slotset *ss, CmiInt8 sslot, CmiInt8 nslots) |
| 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 CmiIsomallocBlock * | map_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 slotmsg * | prepare_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) |
| void * | CmiIsomalloc (int size, CthThread tid) |
| static void * | _isomallocAlign (size_t align, size_t size, size_t reserved, CthThread t) |
| return an aligned isomalloc memory, the alignment occurs after the first 'reserved' bytes. | |
| void * | CmiIsomallocAlign (size_t align, size_t size, CthThread t) |
| int | CmiIsomallocEnabled () |
| 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 CmiIsomallocBlockList * | Slot_fmUser (void *s) |
| CmiIsomallocBlockList * | CmiIsomallocBlockListNew (CthThread tid) |
| static void | print_myslots () |
| void | CmiIsomallocBlockListPup (pup_er p, CmiIsomallocBlockList **lp, CthThread tid) |
| 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] |
| static 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 |
| typedef struct CmiIsomallocBlock CmiIsomallocBlock |
Definition at line 101 of file isomalloc.c.
| typedef size_t memRange_t |
Definition at line 112 of file isomalloc.c.
Definition at line 167 of file isomalloc.c.
| typedef struct _slotblock slotblock |
Definition at line 168 of file isomalloc.c.
| typedef struct _btreenode btreenode |
Definition at line 176 of file isomalloc.c.
| typedef struct _insert_ret_val insert_ret_val |
Definition at line 2291 of file isomalloc.c.
| static int read_randomflag | ( | void | ) | [static] |
| static void* block2pointer | ( | CmiIsomallocBlock * | blockHeader | ) | [static] |
| static CmiIsomallocBlock* pointer2block | ( | void * | heapBlock | ) | [static] |
Definition at line 107 of file isomalloc.c.
Referenced by _isomallocAlign(), CmiIsomallocFree(), CmiIsomallocLength(), and CmiIsomallocPup().
| static void* slot2addr | ( | CmiInt8 | slot | ) | [static] |
Definition at line 128 of file isomalloc.c.
References isomallocStart, and slotsize.
Referenced by map_failed(), map_slots(), and unmap_slots().
Definition at line 134 of file isomalloc.c.
References numslots.
Referenced by init_ranges(), and one_slotOP().
Definition at line 139 of file isomalloc.c.
References slotsize.
Referenced by CmiIsomalloc(), CmiIsomallocFree(), CmiIsomallocPup(), and isomallocfn().
Definition at line 196 of file isomalloc.c.
Referenced by get_slots(), list_delete(), list_insert(), list_move(), and new_slotset().
Definition at line 230 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(), and btree_insert_int().
Definition at line 256 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().
Definition at line 281 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().
| static btreenode* create_btree_node | ( | ) | [static] |
Definition at line 320 of file isomalloc.c.
References _btreenode::blocks, _btreenode::child, _slotblock::listblock, malloc_reentrant(), and _btreenode::num_blocks.
Referenced by btree_insert(), btree_insert_int(), and new_slotset().
Definition at line 338 of file isomalloc.c.
References _btreenode::blocks, _btreenode::child, _slotblock::nslots, _btreenode::num_blocks, and _slotblock::startslot.
Referenced by find_btree_slotblock(), free_slots(), and grab_slots().
| static insert_ret_val btree_insert_int | ( | slotset * | ss, | |
| btreenode * | node, | |||
| CmiInt8 | startslot, | |||
| CmiInt8 | nslots | |||
| ) | [static] |
Definition at line 428 of file isomalloc.c.
References _btreenode::blocks, _insert_ret_val::btn, _btreenode::child, create_btree_node(), list_insert(), _slotblock::listblock, _slotblock::nslots, _btreenode::num_blocks, _insert_ret_val::sb, _dllnode::sb, and _slotblock::startslot.
Referenced by btree_insert(), and btree_insert_int().
| static btreenode* btree_insert | ( | slotset * | ss, | |
| btreenode * | node, | |||
| CmiInt8 | startslot, | |||
| CmiInt8 | nslots | |||
| ) | [static] |
Definition at line 622 of file isomalloc.c.
References _btreenode::blocks, _insert_ret_val::btn, btree_insert_int(), _btreenode::child, create_btree_node(), list_insert(), _slotblock::listblock, _slotblock::nslots, _btreenode::num_blocks, _dllnode::sb, _insert_ret_val::sb, and _slotblock::startslot.
Referenced by free_slots(), and grab_slots().
| static void btree_delete_int | ( | slotset * | ss, | |
| btreenode * | node, | |||
| CmiInt8 | startslot, | |||
| slotblock * | sb | |||
| ) | [static] |
Definition at line 662 of file isomalloc.c.
References _btreenode::blocks, _btreenode::child, free_reentrant(), list_delete(), _slotblock::listblock, _slotblock::nslots, _btreenode::num_blocks, _dllnode::sb, and _slotblock::startslot.
Referenced by btree_delete(), and btree_delete_int().
Definition at line 944 of file isomalloc.c.
References btree_delete_int(), _btreenode::child, free_reentrant(), and _btreenode::num_blocks.
Referenced by free_slots(), and grab_slots().
Definition at line 970 of file isomalloc.c.
References _btreenode::blocks, _slotset::btree_root, create_btree_node(), find_list_bin(), _slotset::list_array, _slotblock::listblock, malloc_reentrant(), _dllnode::next, _slotblock::nslots, _btreenode::num_blocks, _dllnode::previous, _dllnode::sb, and _slotblock::startslot.
Referenced by init_ranges().
Definition at line 1009 of file isomalloc.c.
References find_list_bin(), _slotset::list_array, _dllnode::next, _slotblock::nslots, _dllnode::sb, and _slotblock::startslot.
Referenced by CmiIsomalloc(), and isomallocfn().
Definition at line 1040 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 CmiIsomalloc(), grab_remote(), init_comm(), and isomallocfn().
Definition at line 1096 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().
| static void delete_btree | ( | btreenode * | node | ) | [static] |
Definition at line 1145 of file isomalloc.c.
References _btreenode::child, free_reentrant(), and _btreenode::num_blocks.
Referenced by delete_btree(), and delete_slotset().
| static void delete_list_array | ( | slotset * | ss | ) | [static] |
Definition at line 1161 of file isomalloc.c.
References free_reentrant(), _slotset::list_array, _dllnode::next, and _dllnode::previous.
Referenced by delete_slotset().
| static void delete_slotset | ( | slotset * | ss | ) | [static] |
Definition at line 1183 of file isomalloc.c.
References _slotset::btree_root, delete_btree(), delete_list_array(), and free_reentrant().
Definition at line 1196 of file isomalloc.c.
References _btreenode::blocks, CmiPrintf(), _slotblock::nslots, _btreenode::num_blocks, and _slotblock::startslot.
Referenced by print_btree_level().
| static int print_btree_level | ( | btreenode * | node, | |
| int | level, | |||
| int | current_level, | |||
| int | node_num | |||
| ) | [static] |
Definition at line 1206 of file isomalloc.c.
References _btreenode::child, _btreenode::num_blocks, and print_btree_node().
Referenced by print_btree_level(), and print_btree_top_down().
| static void print_btree_top_down | ( | btreenode * | node | ) | [static] |
Definition at line 1224 of file isomalloc.c.
References CmiPrintf(), level, and print_btree_level().
Referenced by print_slots().
| static void print_list_array | ( | slotset * | ss | ) | [static] |
Definition at line 1240 of file isomalloc.c.
References CmiPrintf(), _slotset::list_array, _dllnode::next, _slotblock::nslots, _dllnode::previous, _dllnode::sb, and _slotblock::startslot.
Referenced by print_slots().
| static void print_slots | ( | slotset * | ss | ) | [static] |
Definition at line 1262 of file isomalloc.c.
References _slotset::btree_root, print_btree_top_down(), and print_list_array().
Referenced by print_myslots().
Definition at line 1334 of file isomalloc.c.
References _slotset::buf, _slotset::emptyslots, free_reentrant(), malloc_reentrant(), _slotset::maxbuf, _slotblock::nslots, and _slotblock::startslot.
| static void* disabled_map | ( | int | nBytes | ) | [static] |
Definition at line 1486 of file isomalloc.c.
References CmiError(), CmiMyPe(), and malloc().
Referenced by CmiIsomalloc().
| static void disabled_unmap | ( | void * | bk | ) | [static] |
| static void disable_isomalloc | ( | const char * | why | ) | [static] |
Definition at line 1501 of file isomalloc.c.
References CmiMyPe(), CmiPrintf(), isomallocEnd, and isomallocStart.
Referenced by CmiIsomallocInit(), and init_ranges().
| static void * call_mmap_fixed | ( | void * | addr, | |
| size_t | len | |||
| ) | [static] |
Definition at line 1511 of file isomalloc.c.
References CmiAbort().
Referenced by bad_location(), and map_slots().
| static void * call_mmap_anywhere | ( | size_t | len | ) | [static] |
Definition at line 1515 of file isomalloc.c.
References CmiAbort().
Referenced by find_largest_free_region().
| static void call_munmap | ( | void * | addr, | |
| size_t | len | |||
| ) | [static] |
Definition at line 1519 of file isomalloc.c.
References CmiAbort().
Referenced by bad_location(), find_largest_free_region(), isofreefn(), map_slots(), try_largest_mmap_region(), and unmap_slots().
| static int init_map | ( | char ** | argv | ) | [static] |
| CpvStaticDeclare | ( | int | , | |
| zerofd | ||||
| ) |
| static void* call_mmap | ( | void * | addr, | |
| size_t | len, | |||
| int | flags | |||
| ) | [static] |
| static CmiIsomallocBlock* map_slots | ( | CmiInt8 | slot, | |
| CmiInt8 | nslots | |||
| ) | [static] |
maps the virtual memory associated with slot using mmap
Definition at line 1589 of file isomalloc.c.
References call_mmap_fixed(), call_munmap(), CmiMyPe(), CmiPrintf(), slot2addr(), and slotsize.
Referenced by CmiIsomalloc(), CmiIsomallocBlockListPup(), CmiIsomallocPup(), and isomallocfn().
Definition at line 1622 of file isomalloc.c.
References call_munmap(), CmiMyPe(), CmiPrintf(), slot2addr(), and slotsize.
Referenced by CmiIsomallocFree(), and CmiIsomallocPup().
Definition at line 1632 of file isomalloc.c.
References CmiAbort(), CmiError(), errno, slot2addr(), and slotsize.
Referenced by CmiIsomalloc(), CmiIsomallocPup(), and isomallocfn().
| CpvStaticDeclare | ( | slotset * | , | |
| myss | ||||
| ) |
| CtvDeclare | ( | mempool_type * | , | |
| threadpool | ||||
| ) |
| void* isomallocfn | ( | size_t * | size, | |
| mem_handle_t * | mem_hndl, | |||
| int | expand_flag | |||
| ) |
Definition at line 1650 of file isomalloc.c.
References CmiAbort(), CmiError(), CmiMyPe(), errno, get_slots(), grab_slots(), length2slots(), map_failed(), map_slots(), n, s, and slotsize.
Referenced by CmiIsomalloc().
| void isofreefn | ( | void * | ptr, | |
| mem_handle_t | mem_hndl | |||
| ) |
Definition at line 1678 of file isomalloc.c.
References call_munmap(), and size.
Referenced by CmiIsomalloc().
| static void* __cur_stack_frame | ( | void | ) | [static] |
| static void* __static_data_loc | ( | void | ) | [static] |
| static int pointer_lt | ( | const char * | a, | |
| const char * | b | |||
| ) | [static] |
Definition at line 1708 of file isomalloc.c.
Referenced by CmiIsomallocInRange(), find_free_region(), pmax(), and pmin().
| static int pointer_ge | ( | const char * | a, | |
| const char * | b | |||
| ) | [static] |
| static char* pmin | ( | char * | a, | |
| char * | b | |||
| ) | [static] |
Definition at line 1715 of file isomalloc.c.
References pointer_lt().
Referenced by check_range(), and find_free_region().
| static char* pmax | ( | char * | a, | |
| char * | b | |||
| ) | [static] |
Definition at line 1716 of file isomalloc.c.
References pointer_lt().
Referenced by find_free_region().
| static int bad_location | ( | char * | loc | ) | [static] |
Definition at line 1724 of file isomalloc.c.
References call_mmap_fixed(), call_munmap(), CmiMyPe(), CmiPrintf(), and slotsize.
Referenced by good_range(), and partially_good().
| static memRange_t divide_range | ( | memRange_t | len, | |
| int | n | |||
| ) | [static] |
Definition at line 1738 of file isomalloc.c.
Referenced by check_range(), good_range(), and partially_good().
| static int partially_good | ( | char * | start, | |
| memRange_t | len, | |||
| int | n | |||
| ) | [static] |
Definition at line 1743 of file isomalloc.c.
References bad_location(), and divide_range().
Referenced by check_range().
| static int good_range | ( | char * | start, | |
| memRange_t | len, | |||
| int | n | |||
| ) | [static] |
Definition at line 1754 of file isomalloc.c.
References bad_location(), CmiPrintf(), and divide_range().
Referenced by check_range(), and try_largest_mmap_region().
| static void check_range | ( | char * | start, | |
| char * | end, | |||
| memRegion_t * | max | |||
| ) | [static] |
Definition at line 1771 of file isomalloc.c.
References CmiMyPe(), CmiPrintf(), divide_range(), good_range(), memRegion_t::len, n, partially_good(), pmin(), memRegion_t::start, and memRegion_t::type.
Referenced by find_free_region().
| static memRegion_t find_free_region | ( | memRegion_t * | used, | |
| int | nUsed, | |||
| int | atLeast | |||
| ) | [static] |
Definition at line 1833 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().
| static int find_largest_free_region | ( | memRegion_t * | destRegion | ) | [static] |
Definition at line 1864 of file isomalloc.c.
References __cur_stack_frame(), __static_data_loc(), call_mmap_anywhere(), call_munmap(), CmiMyPe(), CmiPrintf(), errno, find_free_region(), free(), memRegion_t::len, malloc(), p, memRegion_t::start, and memRegion_t::type.
Referenced by init_ranges().
| static int try_largest_mmap_region | ( | memRegion_t * | destRegion | ) | [static] |
Definition at line 1947 of file isomalloc.c.
References call_munmap(), CmiMyPe(), CmiPrintf(), good_range(), memRegion_t::len, s, size, and memRegion_t::start.
Referenced by init_ranges().
| static void init_ranges | ( | char ** | argv | ) | [static] |
Definition at line 2014 of file isomalloc.c.
References CmiAbort(), CmiBarrier(), CmiMyPe(), CmiMyRank(), CmiNodeAllBarrier(), CmiPrintf(), disable_isomalloc(), find_largest_free_region(), getpagesize(), isomallocEnd, isomallocStart, memRegion_t::len, new_slotset(), numslots, pe2slot(), printf(), s, slotsize, memRegion_t::start, try_largest_mmap_region(), and write().
Referenced by CmiIsomallocInit().
Definition at line 2263 of file isomalloc.c.
References CmiAlloc(), CmiMyPe(), _slotmsg::nslots, _slotmsg::pe, and _slotmsg::slot.
Referenced by one_slotOP().
| static void grab_remote | ( | slotmsg * | msg | ) | [static] |
Definition at line 2272 of file isomalloc.c.
References CmiFree(), grab_slots(), _slotmsg::nslots, and _slotmsg::slot.
Referenced by init_comm().
| static void free_remote | ( | slotmsg * | msg | ) | [static] |
Definition at line 2278 of file isomalloc.c.
References CmiFree(), free_slots(), _slotmsg::nslots, and _slotmsg::slot.
Referenced by init_comm().
| static void init_comm | ( | char ** | argv | ) | [static] |
Definition at line 2294 of file isomalloc.c.
References CmiRegisterHandler(), free_remote(), free_slots(), grab_remote(), grab_slots(), slotOP::local, and slotOP::remote.
Definition at line 2306 of file isomalloc.c.
References CmiMyPe(), Converse::CmiSyncSendAndFree(), slotOP::local, pe2slot(), prepare_slotmsg(), and slotOP::remote.
Referenced by all_slotOP().
Definition at line 2331 of file isomalloc.c.
References one_slotOP(), and slot2pe().
Referenced by CmiIsomallocFree(), and CmiIsomallocPup().
Definition at line 2341 of file isomalloc.c.
References block2pointer(), CmiAbort(), CmiError(), CmiMyPe(), CthSelf(), disabled_map(), errno, get_slots(), grab_slots(), isofreefn(), isomallocfn(), isomallocStart, CmiIsomallocBlock::length, length2slots(), map_failed(), map_slots(), mempool_init(), mempool_malloc(), n, printf(), s, and CmiIsomallocBlock::slot.
Referenced by _isomallocAlign(), CtgGlobalStruct::allocate(), CmiIsomallocBlockListMalloc(), CmiIsomallocBlockListNew(), and CthAllocateStack().
| static void* _isomallocAlign | ( | size_t | align, | |
| size_t | size, | |||
| size_t | reserved, | |||
| CthThread | t | |||
| ) | [static] |
return an aligned isomalloc memory, the alignment occurs after the first 'reserved' bytes.
Total requested size is (size+reserved)
Definition at line 2403 of file isomalloc.c.
References CmiIsomalloc(), pointer2block(), ptr, and s.
Referenced by CmiIsomallocAlign(), and CmiIsomallocBlockListMallocAlign().
| void* CmiIsomallocAlign | ( | size_t | align, | |
| size_t | size, | |||
| CthThread | t | |||
| ) |
Definition at line 2431 of file isomalloc.c.
References _isomallocAlign().
Referenced by allocNewTLSSeg().
| int CmiIsomallocEnabled | ( | ) |
Definition at line 2436 of file isomalloc.c.
References isomallocStart.
Referenced by checkAddress().
| void CmiIsomallocPup | ( | pup_er | p, | |
| void ** | blockPtrPtr | |||
| ) |
Definition at line 2441 of file isomalloc.c.
References all_slotOP(), block2pointer(), CmiAbort(), isomallocStart, CmiIsomallocBlock::length, length, length2slots(), map_failed(), map_slots(), n, pointer2block(), pup_bytes(), pup_isDeleting(), pup_isRestarting(), pup_isUnpacking(), pup_isUserlevel(), s, CmiIsomallocBlock::slot, and unmap_slots().
Referenced by CmiIsomallocBlockListPup(), CthPupBase(), and CtgGlobalStruct::pup().
| void CmiIsomallocFree | ( | void * | blockPtr | ) |
Definition at line 2485 of file isomalloc.c.
References all_slotOP(), disabled_unmap(), isomallocStart, CmiIsomallocBlock::length, length2slots(), mempool_free_thread(), n, pointer2block(), s, CmiIsomallocBlock::slot, and unmap_slots().
Referenced by CmiIsomallocBlockListDelete(), CmiIsomallocBlockListFree(), CthThreadBaseFree(), and CtgGlobalStruct::~CtgGlobalStruct().
| CmiInt8 CmiIsomallocLength | ( | void * | block | ) |
Definition at line 2505 of file isomalloc.c.
References CmiIsomallocBlock::length, and pointer2block().
Referenced by meta_realloc().
| int CmiIsomallocInRange | ( | void * | addr | ) |
Definition at line 2511 of file isomalloc.c.
References isomallocEnd, isomallocStart, pointer_ge(), and pointer_lt().
Referenced by checkAddress(), meta_free(), and meta_realloc().
| static char* Slot_toUser | ( | CmiIsomallocBlockList * | s | ) | [static] |
Definition at line 2568 of file isomalloc.c.
Referenced by checkSlot(), CmiIsomallocBlockListMalloc(), CmiIsomallocBlockListMallocAlign(), freeSlot(), printSlot(), setSlot(), and slotAbort().
| static CmiIsomallocBlockList* Slot_fmUser | ( | void * | s | ) | [static] |
Definition at line 2569 of file isomalloc.c.
Referenced by CmiIsomallocBlockListFree(), CmiMemoryMarkBlock(), and meta_realloc().
| CmiIsomallocBlockList* CmiIsomallocBlockListNew | ( | CthThread | tid | ) |
Definition at line 2572 of file isomalloc.c.
References CmiIsomalloc(), CmiIsomallocBlockList::next, and CmiIsomallocBlockList::prev.
Referenced by ArmciVirtualProcessor::ArmciVirtualProcessor(), and TCharm::TCharm().
| static void print_myslots | ( | ) | [static] |
| void CmiIsomallocBlockListPup | ( | pup_er | p, | |
| CmiIsomallocBlockList ** | lp, | |||
| CthThread | tid | |||
| ) |
Definition at line 2589 of file isomalloc.c.
References CmiAbort(), CmiCreateLock(), CmiIsomallocPup(), CmiMyPe(), CthSelf(), map_slots(), mempool_destroy(), mempool_type::mempoolLock, CmiIsomallocBlockList::next, printf(), pup_bytes(), pup_isDeleting(), pup_isUnpacking(), slot_header_::size, size, and slotsize.
Referenced by ArmciVirtualProcessor::pup(), and TCharm::pupThread().
| void CmiIsomallocBlockListDelete | ( | CmiIsomallocBlockList * | l | ) |
Definition at line 2737 of file isomalloc.c.
References CmiIsomallocFree(), and CmiIsomallocBlockList::next.
Referenced by TCharm::clear(), ArmciVirtualProcessor::~ArmciVirtualProcessor(), and TCharm::~TCharm().
| void* CmiIsomallocBlockListMalloc | ( | CmiIsomallocBlockList * | l, | |
| size_t | nBytes | |||
| ) |
Definition at line 2750 of file isomalloc.c.
References CmiIsomalloc(), n, CmiIsomallocBlockList::next, CmiIsomallocBlockList::prev, and Slot_toUser().
Referenced by ArmciVirtualProcessor::BlockMalloc(), and meta_malloc().
| void* CmiIsomallocBlockListMallocAlign | ( | CmiIsomallocBlockList * | l, | |
| size_t | align, | |||
| size_t | nBytes | |||
| ) |
Definition at line 2763 of file isomalloc.c.
References _isomallocAlign(), n, CmiIsomallocBlockList::next, CmiIsomallocBlockList::prev, and Slot_toUser().
Referenced by meta_memalign().
| void CmiIsomallocBlockListFree | ( | void * | block | ) |
Definition at line 2776 of file isomalloc.c.
References CmiAbort(), CmiIsomallocFree(), n, CmiIsomallocBlockList::next, CmiIsomallocBlockList::prev, and Slot_fmUser().
Referenced by ARMCI_Free(), ARMCI_Free_local(), and meta_free().
| int cutOffPoints[cutOffNum] |
Definition at line 68 of file isomalloc.c.
Definition at line 70 of file isomalloc.c.
int _mmap_probe = 0 [static] |
Definition at line 72 of file isomalloc.c.
size_t slotsize [static] |
Definition at line 115 of file isomalloc.c.
Referenced by bad_location(), CmiIsomallocBlockListPup(), init_ranges(), isomallocfn(), length2slots(), map_failed(), map_slots(), slot2addr(), and unmap_slots().
size_t regionSize [static] |
Definition at line 116 of file isomalloc.c.
char* isomallocStart = NULL [static] |
Definition at line 124 of file isomalloc.c.
Referenced by CmiIsomalloc(), CmiIsomallocEnabled(), CmiIsomallocFree(), CmiIsomallocInRange(), CmiIsomallocPup(), disable_isomalloc(), init_ranges(), and slot2addr().
char* isomallocEnd = NULL [static] |
Definition at line 125 of file isomalloc.c.
Referenced by CmiIsomallocInRange(), disable_isomalloc(), and init_ranges().
int disabled_map_warned = 0 [static] |
Definition at line 1485 of file isomalloc.c.
const memRange_t meg = 1024u*1024u [static] |
Definition at line 1718 of file isomalloc.c.
const memRange_t gig = 1024u*1024u*1024u [static] |
Definition at line 1719 of file isomalloc.c.
int grab_remote_idx [static] |
Definition at line 2283 of file isomalloc.c.
int free_remote_idx [static] |
Definition at line 2283 of file isomalloc.c.
Definition at line 2292 of file isomalloc.c.
Definition at line 2292 of file isomalloc.c.
1.5.5