Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Ase::FastMemory::HugePage Struct Reference

Interface to the OS huge page allocator. More...

#include "memory.hh"

Inheritance diagram for Ase::FastMemory::HugePage:
[legend]

Public Types

using HugePageP = std::shared_ptr< HugePage >
 

Public Member Functions

size_t alignment () const
 Alignment of the memory area.
 
size_t size () const
 Size in bytes of the memroy area.
 
charmem () const
 Allocated memroy area.
 

Static Public Member Functions

static HugePageP allocate (size_t minimum_alignment, size_t bytelength)
 Try to allocate a HugePage >= bytelength with minimum_alignment, usual sizes are 2MB.
 

Protected Member Functions

 HugePage (void *m, size_t s)
 

Protected Attributes

void *const start_
 
const size_t size_
 

Detailed Description

Interface to the OS huge page allocator.

Definition at line 120 of file memory.hh.

Member Typedef Documentation

◆ HugePageP

Definition at line 121 of file memory.hh.

Constructor & Destructor Documentation

◆ HugePage()

Ase::FastMemory::HugePage::HugePage ( void *  m,
size_t  s 
)
explicitprotected

Definition at line 25 of file memory.cc.

◆ ~HugePage()

virtual Ase::FastMemory::HugePage::~HugePage ( )
protectedvirtual

Definition at line 131 of file memory.hh.

Member Function Documentation

◆ alignment()

size_t Ase::FastMemory::HugePage::alignment ( ) const

Alignment of the memory area.

Definition at line 123 of file memory.hh.

References size_t.

◆ allocate()

HugePageP Ase::FastMemory::HugePage::allocate ( size_t  minimum_alignment,
size_t  bytelength 
)
static

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

Definition at line 52 of file memory.cc.

References std::aligned_alloc(), assert_return, errno(), std::max(), mlock(), mmap(), munmap(), size_t, strerror(), sysconf(), and uintptr_t.

◆ mem()

char * Ase::FastMemory::HugePage::mem ( ) const

Allocated memroy area.

Definition at line 125 of file memory.hh.

◆ size()

size_t Ase::FastMemory::HugePage::size ( ) const

Size in bytes of the memroy area.

Definition at line 124 of file memory.hh.

Member Data Documentation

◆ size_

const size_t Ase::FastMemory::HugePage::size_
protected

Definition at line 129 of file memory.hh.

◆ start_

void* const Ase::FastMemory::HugePage::start_
protected

Definition at line 128 of file memory.hh.


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