Anklang C++ API 0.0.0
Loading...
Searching...
No Matches
HugePage

#include "memory.hh"

Inheritance diagram for HugePage:
[legend]

Public Types

usingHugePageP = std::shared_ptr< HugePage >

Public Member Functions

size_talignment () const
char *mem () const
size_tsize () const

Static Public Member Functions

static HugePagePallocate (size_t minimum_alignment, size_t bytelength)

Protected Member Functions

HugePage (void *m, size_t s)
virtual~HugePage ()

Protected Attributes

const size_tsize_
void *conststart_

Detailed Description

Interface to the OS huge page allocator.

Member Typedef Documentation

HugePageP

using HugePageP = std::shared_ptr<HugePage>

Constructor & Destructor Documentation

HugePage()

HugePage ( void * m,
size_t s
)
explicitprotected

~HugePage()

virtual ~HugePage ( )
protectedvirtual

Member Function Documentation

alignment()

size_t alignment ( ) const

Alignment of the memory area.

size()

size_t size ( ) const

Size in bytes of the memroy area.

mem()

char * mem ( ) const

Allocated memroy area.

allocate()

HugePageP allocate ( size_t minimum_alignment,
size_t bytelength
)
static

Try to allocate a HugePage `>= bytelength` with `minimum_alignment`, usual sizes are 2MB.

Member Data Documentation

start_

void* const start_
protected

size_

const size_t size_
protected