SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::Core::Mem::Arena Class Referencefinal

#include <swcdb/core/PageArena.h>

+ Collaboration diagram for SWC::Core::Mem::Arena:

Public Member Functions

Item::Ptr use (const uint8_t *buf, uint32_t size)
 
void free (Item::Ptr ptr)
 
Pagepage_by_sz (uint32_t sz)
 
size_t count () const
 
size_t pages () const
 
const Pagepage (uint8_t idx) const
 

Private Attributes

Page _pages [256]
 

Detailed Description

Definition at line 252 of file PageArena.h.

Member Function Documentation

◆ count()

size_t SWC::Core::Mem::Arena::count ( ) const
inline

Definition at line 267 of file PageArena.h.

References _pages.

◆ free()

void SWC::Core::Mem::Arena::free ( Item::Ptr  ptr)
inline

Definition at line 259 of file PageArena.h.

References SWC::Core::Mem::Page::free(), page_by_sz(), and SWC::Core::Mem::Item::size().

Referenced by SWC::Core::Mem::Item::release().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ page()

const Page& SWC::Core::Mem::Arena::page ( uint8_t  idx) const
inline

Definition at line 278 of file PageArena.h.

References _pages.

◆ page_by_sz()

Page& SWC::Core::Mem::Arena::page_by_sz ( uint32_t  sz)
inline

Definition at line 263 of file PageArena.h.

References _pages.

Referenced by free(), and use().

+ Here is the caller graph for this function:

◆ pages()

size_t SWC::Core::Mem::Arena::pages ( ) const
inline

Definition at line 274 of file PageArena.h.

◆ use()

Item::Ptr SWC::Core::Mem::Arena::use ( const uint8_t *  buf,
uint32_t  size 
)
inline

Definition at line 255 of file PageArena.h.

References page_by_sz(), size, and SWC::Core::Mem::Page::use().

Referenced by SWC::Core::Mem::Item::make().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _pages

Page SWC::Core::Mem::Arena::_pages[256]
private

Definition at line 283 of file PageArena.h.

Referenced by count(), page(), and page_by_sz().


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