libbio
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
bio::pointer_arena::PointerArena Class Reference

#include <PointerArena.h>

Inheritance diagram for bio::pointer_arena::PointerArena:
Inheritance graph
[legend]
Collaboration diagram for bio::pointer_arena::PointerArena:
Collaboration graph
[legend]

Public Member Functions

 PointerArena ()
 
 ~PointerArena ()
 
voidAllocateBytes (::std::size_t bytes, ::std::size_t align)
 
voidReallocateBytes (void *raw, ::std::size_t oldBytes, ::std::size_t newBytes, ::std::size_t align)
 
void FreeBytes (void *raw, ::std::size_t bytes)
 
Handle HandleFor (const void *raw)
 
Handle ArenaHandleFor (const void *raw) const
 
const voidResolve (Handle handle) const
 
bool Owns (const void *raw) const
 
bool IsArenaHandle (Handle handle) const
 
bool IsForeignHandle (Handle handle) const
 
const voidGetBase () const
 
::std::size_t GetCapacityBytes () const
 
::std::size_t GetBytesHandedOut () const
 
::std::size_t GetForeignCount () const
 
::std::size_t GetAllocationRecordCount () const
 
::std::size_t GetSmallAllocationCount () const
 
::std::size_t GetPageRecordCount () const
 
- Public Member Functions inherited from bio::ThreadSafe
 ThreadSafe ()
 
 ThreadSafe (const ThreadSafe &toCopy)
 
ThreadSafeoperator= (const ThreadSafe &toCopy)
 
 ~ThreadSafe ()
 
void LockThread () const
 
void UnlockThread () const
 
void LockMutexShared () const
 
void UnlockMutexShared () const
 

Static Public Member Functions

static PointerArenaInstance ()
 

Friends

void DeleteObjectStorage (void *raw, ::std::size_t bytes)
 
void FreeBytes (void *raw, ::std::size_t bytes)
 

Detailed Description

Process-lifetime arena used by level-2 compact-pointer builds.

Mutating operations (reserve, bump allocation, foreign raw-pointer import) are serialized by ThreadSafe / SafelyAccess. Arena-backed handle resolution is intentionally a racey read: an arena handle is a shifted word offset and resolves as base + ((handle - 1) << WordShift). Existing non-arena raw pointers use a high-bit foreign handle stored in an Arrangement<const void*> so the tree can be migrated incrementally without returning to std container side tables.

Constructor & Destructor Documentation

◆ PointerArena()

bio::pointer_arena::PointerArena::PointerArena ( )

◆ ~PointerArena()

bio::pointer_arena::PointerArena::~PointerArena ( )

Member Function Documentation

◆ AllocateBytes()

void * bio::pointer_arena::PointerArena::AllocateBytes ( ::std::size_t  bytes,
::std::size_t  align 
)

◆ ArenaHandleFor()

Handle bio::pointer_arena::PointerArena::ArenaHandleFor ( const void raw) const

◆ FreeBytes()

void bio::pointer_arena::PointerArena::FreeBytes ( void raw,
::std::size_t  bytes 
)

◆ GetAllocationRecordCount()

std::size_t bio::pointer_arena::PointerArena::GetAllocationRecordCount ( ) const

◆ GetBase()

const void * bio::pointer_arena::PointerArena::GetBase ( ) const

◆ GetBytesHandedOut()

std::size_t bio::pointer_arena::PointerArena::GetBytesHandedOut ( ) const

◆ GetCapacityBytes()

std::size_t bio::pointer_arena::PointerArena::GetCapacityBytes ( ) const

◆ GetForeignCount()

std::size_t bio::pointer_arena::PointerArena::GetForeignCount ( ) const

◆ GetPageRecordCount()

std::size_t bio::pointer_arena::PointerArena::GetPageRecordCount ( ) const

◆ GetSmallAllocationCount()

std::size_t bio::pointer_arena::PointerArena::GetSmallAllocationCount ( ) const

◆ HandleFor()

Handle bio::pointer_arena::PointerArena::HandleFor ( const void raw)

◆ Instance()

PointerArena & bio::pointer_arena::PointerArena::Instance ( )
static

◆ IsArenaHandle()

bool bio::pointer_arena::PointerArena::IsArenaHandle ( Handle  handle) const

◆ IsForeignHandle()

bool bio::pointer_arena::PointerArena::IsForeignHandle ( Handle  handle) const

◆ Owns()

bool bio::pointer_arena::PointerArena::Owns ( const void raw) const

◆ ReallocateBytes()

void * bio::pointer_arena::PointerArena::ReallocateBytes ( void raw,
::std::size_t  oldBytes,
::std::size_t  newBytes,
::std::size_t  align 
)

◆ Resolve()

const void * bio::pointer_arena::PointerArena::Resolve ( Handle  handle) const

Friends And Related Symbol Documentation

◆ DeleteObjectStorage

void DeleteObjectStorage ( void raw,
::std::size_t  bytes 
)
friend

◆ FreeBytes

void bio::pointer_arena::PointerArena::FreeBytes ( void raw,
::std::size_t  bytes 
)
friend

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