PPL Logo

arch/util/mempool.C File Reference

Go to the source code of this file.

Functions

INLINE_KEYWORD int which_pow2 (size_t size)
INLINE_KEYWORD void fillblock (mempool_type *mptr, block_header *block_head, size_t pool_size, int expansion)
int checkblock (mempool_type *mptr, block_header *current, int power)
void removeblocks (mempool_type *mptr)
mempool_typemempool_init (size_t pool_size, mempool_newblockfn allocfn, mempool_freeblock freefn, size_t limit)
 initialize mempool
void mempool_destroy (mempool_type *mptr)
void * mempool_malloc (mempool_type *mptr, size_t size, int expand)
void * mempool_large_malloc (mempool_type *mptr, size_t size, int expand)
void mempool_free_thread (void *ptr_free)
void mempool_free (mempool_type *mptr, void *ptr_free)
void * getNextRegisteredPool (void *current)

Variables

int cutOffPoints []


Function Documentation

INLINE_KEYWORD int which_pow2 ( size_t  size  ) 

Definition at line 43 of file mempool.C.

References cutOffPoints.

Referenced by fillblock(), mempool_free(), mempool_init(), and mempool_malloc().

Here is the caller graph for this function:

INLINE_KEYWORD void fillblock ( mempool_type mptr,
block_header block_head,
size_t  pool_size,
int  expansion 
)

Definition at line 57 of file mempool.C.

References slot_header_::block_ptr, CmiAbort(), cutOffPoints, block_header::freelists, slot_header_::gnext, slot_header_::gprev, left(), slot_header_::next, slot_header_::power, slot_header_::prev, slot_header_::size, slot_header_::status, and which_pow2().

Referenced by mempool_init(), and mempool_malloc().

Here is the call graph for this function:

Here is the caller graph for this function:

int checkblock ( mempool_type mptr,
block_header current,
int  power 
)

void removeblocks ( mempool_type mptr  ) 

mempool_type* mempool_init ( size_t  pool_size,
mempool_newblockfn  allocfn,
mempool_freeblock  freefn,
size_t  limit 
)

void mempool_destroy ( mempool_type mptr  ) 

void* mempool_malloc ( mempool_type mptr,
size_t  size,
int  expand 
)

void* mempool_large_malloc ( mempool_type mptr,
size_t  size,
int  expand 
)

void mempool_free_thread ( void *  ptr_free  ) 

Definition at line 433 of file mempool.C.

References slot_header_::block_ptr, CmiLock(), CmiUnlock(), mempool_free(), mempool_type::mempoolLock, and slot_header_::status.

Referenced by CmiIsomallocFree().

Here is the call graph for this function:

Here is the caller graph for this function:

void mempool_free ( mempool_type mptr,
void *  ptr_free 
)

void* getNextRegisteredPool ( void *  current  )  [inline]

Definition at line 588 of file mempool.C.


Variable Documentation

Initial value:

 {64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768,
                      65536, 131072, 262144, 524288, 1048576, 2097152, 4194304,
                      8388608, 16777216, 33554432, 67108864, 134217728,
                      268435456, 536870912, 1073741824}

Definition at line 38 of file mempool.C.

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


Generated on Mon Sep 21 08:11:00 2020 for Charm++ by  doxygen 1.5.5