Atlas Runtime
Atlas::PRegionMgr Class Reference

#include <pregion_mgr.hpp>

Public Member Functions

region_id_t getOpenPRegionId (const void *addr, size_t sz) const
 
bool isInOpenPRegion (const void *addr, size_t sz) const
 
PRegiongetPRegion (region_id_t rid) const
 
void * allocMem (size_t sz, region_id_t rid, bool does_need_cache_line_alignment, bool does_need_logging) const
 
void * callocMem (size_t nmemb, size_t sz, region_id_t) const
 
void * reallocMem (void *, size_t, region_id_t) const
 
void freeMem (void *ptr, bool should_log=true) const
 
void deleteMem (void *ptr, bool should_log=true) const
 
void freeMemImpl (region_id_t rgn_id, void *ptr, bool should_log) const
 
void * allocMemWithoutLogging (size_t sz, region_id_t rid) const
 
void * allocMemCacheLineAligned (size_t sz, region_id_t rid, bool should_log) const
 
region_id_t findOrCreatePRegion (const char *name, int flags, int *is_created=nullptr)
 
region_id_t findPRegion (const char *name, int flags, bool is_in_recovery=false)
 
region_id_t createPRegion (const char *name, int flags)
 
void closePRegion (region_id_t, bool is_deleting=false)
 
void deletePRegion (const char *name)
 
void deleteForcefullyPRegion (const char *name)
 
void deleteForcefullyAllPRegions ()
 
void * getPRegionRoot (region_id_t) const
 
void setPRegionRoot (region_id_t, void *new_root) const
 
PRegionsearchPRegion (const char *name) const
 
std::pair< void *,region_id_tensurePRegionMapped (void *addr)
 
void dumpDebugInfo () const
 

Static Public Member Functions

static PRegionMgrcreateInstance ()
 
static void deleteInstance ()
 
static PRegionMgrgetInstance ()
 
static bool hasInstance ()
 

Member Function Documentation

void * Atlas::PRegionMgr::allocMem ( size_t  sz,
region_id_t  rid,
bool  does_need_cache_line_alignment,
bool  does_need_logging 
) const
inline
void * Atlas::PRegionMgr::allocMemCacheLineAligned ( size_t  sz,
region_id_t  rid,
bool  should_log 
) const
inline
void * Atlas::PRegionMgr::allocMemWithoutLogging ( size_t  sz,
region_id_t  rid 
) const
inline
void * Atlas::PRegionMgr::callocMem ( size_t  nmemb,
size_t  sz,
region_id_t  rid 
) const
inline
void Atlas::PRegionMgr::closePRegion ( region_id_t  rid,
bool  is_deleting = false 
)

Remove the mappings of a persistent region from memory. It cannot be subsequently used without "finding" it again.

static PRegionMgr& Atlas::PRegionMgr::createInstance ( )
inlinestatic
region_id_t Atlas::PRegionMgr::createPRegion ( const char *  name,
int  flags 
)

Create a new persistent region with the given name and attributes

void Atlas::PRegionMgr::deleteForcefullyAllPRegions ( )

Delete all persistent regions without considering their attributes

void Atlas::PRegionMgr::deleteForcefullyPRegion ( const char *  name)

Delete a persistent region without considering its attributes

static void Atlas::PRegionMgr::deleteInstance ( )
inlinestatic
void Atlas::PRegionMgr::deleteMem ( void *  ptr,
bool  should_log = true 
) const

Entry point for deleting a persistent location

void Atlas::PRegionMgr::deletePRegion ( const char *  name)

Delete a persistent region by name. All data within it will disappear as well

void Atlas::PRegionMgr::dumpDebugInfo ( ) const
inline

Used with the debug flag below

Serial mode only or if appropriate locks are held

std::pair< void *, region_id_t > Atlas::PRegionMgr::ensurePRegionMapped ( void *  addr)

Given an address, make sure that the persistent regions it belongs to is mapped

region_id_t Atlas::PRegionMgr::findOrCreatePRegion ( const char *  name,
int  flags,
int *  is_created = nullptr 
)

Given a persistent region name and corresponding attributes, return its id, creating it if necessary

region_id_t Atlas::PRegionMgr::findPRegion ( const char *  name,
int  flags,
bool  is_in_recovery = false 
)

Find a persistent region by its name and return its id

void Atlas::PRegionMgr::freeMem ( void *  ptr,
bool  should_log = true 
) const

Entry point for freeing a persistent location

void Atlas::PRegionMgr::freeMemImpl ( region_id_t  rgn_id,
void *  ptr,
bool  should_log 
) const
static PRegionMgr& Atlas::PRegionMgr::getInstance ( )
inlinestatic
region_id_t Atlas::PRegionMgr::getOpenPRegionId ( const void *  addr,
size_t  sz 
) const

Given a memory address and a size, return the id of the open persistent region that it belongs to

PRegion* Atlas::PRegionMgr::getPRegion ( region_id_t  rid) const
inline
void * Atlas::PRegionMgr::getPRegionRoot ( region_id_t  rid) const
inline
static bool Atlas::PRegionMgr::hasInstance ( )
inlinestatic
bool Atlas::PRegionMgr::isInOpenPRegion ( const void *  addr,
size_t  sz 
) const
inline
void * Atlas::PRegionMgr::reallocMem ( void *  ptr,
size_t  sz,
region_id_t  rid 
) const
inline
PRegion * Atlas::PRegionMgr::searchPRegion ( const char *  name) const

Given a name, search the persistent region metadata and return a pointer to the corresponding metadata entry if it exists

void Atlas::PRegionMgr::setPRegionRoot ( region_id_t  rid,
void *  new_root 
) const

Set the root of a region to the provided new root.


The documentation for this class was generated from the following files: