Atlas Runtime
Atlas::PArena Class Reference

#include <pmalloc.hpp>

Public Member Functions

 PArena ()
 
 ~PArena ()
 
 PArena (const PArena &)=delete
 
 PArena (PArena &&)=delete
 
PArenaoperator= (const PArena &)=delete
 
PArenaoperator= (PArena &&)=delete
 
void initAllocAddresses (void *start_addr)
 
void initTransients ()
 
void * get_curr_alloc_addr () const
 
void * get_start_addr () const
 
void * get_end_addr () const
 
uint64_t get_actual_alloced () const
 
bool doesRangeCheck (void *start, size_t sz) const
 
void * allocMem (size_t sz, bool does_need_cache_line_alignment, bool does_need_logging)
 
void * allocFromFreeList (size_t sz, bool does_need_cache_line_alignment, bool does_need_logging)
 
void * allocFromUpdatedFreeList (size_t sz, bool does_need_cache_line_alignment, bool does_need_logging)
 
void * allocRawMem (size_t)
 
void freeMem (void *ptr, bool should_log)
 
void Lock ()
 
int tryLock ()
 
void Unlock ()
 

Constructor & Destructor Documentation

Atlas::PArena::PArena ( )
inlineexplicit
Atlas::PArena::~PArena ( )
inline
Atlas::PArena::PArena ( const PArena )
delete
Atlas::PArena::PArena ( PArena &&  )
delete

Member Function Documentation

void * Atlas::PArena::allocFromFreeList ( size_t  sz,
bool  does_need_cache_line_alignment,
bool  does_need_logging 
)

Given a size, allocate memory from the arena free list, if possible.

void * Atlas::PArena::allocFromUpdatedFreeList ( size_t  sz,
bool  does_need_cache_line_alignment,
bool  does_need_logging 
)

Given a size, traverse the arena from the start while looking for a free chunk of memory that can satisfy the allocation request. The arena free list is updated as the traversal is performed.

void * Atlas::PArena::allocMem ( size_t  sz,
bool  does_need_cache_line_alignment,
bool  does_need_logging 
)

Given a size, allocate memory using the bump pointer. If it reaches the end of the arena, return null.

void * Atlas::PArena::allocRawMem ( size_t  sz)

Special form of "raw" memory allocation using the bump pointer.

bool Atlas::PArena::doesRangeCheck ( void *  start,
size_t  sz 
) const
inline
void Atlas::PArena::freeMem ( void *  ptr,
bool  should_log 
)

Given a pointer to persistent memory, mark the location free and add it to the free list.

uint64_t Atlas::PArena::get_actual_alloced ( ) const
inline
void* Atlas::PArena::get_curr_alloc_addr ( ) const
inline
void* Atlas::PArena::get_end_addr ( ) const
inline
void* Atlas::PArena::get_start_addr ( ) const
inline
void Atlas::PArena::initAllocAddresses ( void *  start_addr)
inline
void Atlas::PArena::initTransients ( )
inline
void Atlas::PArena::Lock ( )
inline
PArena& Atlas::PArena::operator= ( const PArena )
delete
PArena& Atlas::PArena::operator= ( PArena &&  )
delete
int Atlas::PArena::tryLock ( )
inline
void Atlas::PArena::Unlock ( )
inline

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