API Documentation
Public Member Functions | List of all members
nkMemory::DefaultMemorySpace Class Referencefinal

A basic memory space with default implementation. More...

Inheritance diagram for nkMemory::DefaultMemorySpace:
nkMemory::MemorySpace< char * >

Public Member Functions

 DefaultMemorySpace (unsigned long long spaceSize) noexcept
 
virtual ~DefaultMemorySpace ()
 
virtual char * getBasePtr () const override
 
virtual char * getOffsetPtr (unsigned long long offset) const override
 
- Public Member Functions inherited from nkMemory::MemorySpace< char * >
virtual ~MemorySpace ()=default
 
virtual char * getBasePtr () const=0
 

Detailed Description

A basic memory space with default implementation.

It can be seen as a binary buffer in which memory addressing is done. Allocation is done through a straightforward new char [] to accommodate the space size requested.

Constructor & Destructor Documentation

◆ DefaultMemorySpace()

nkMemory::DefaultMemorySpace::DefaultMemorySpace ( unsigned long long  spaceSize)
noexcept

Constructor.

Parameters
spaceSizeThe size needed for the memory space, in bytes.

◆ ~DefaultMemorySpace()

virtual nkMemory::DefaultMemorySpace::~DefaultMemorySpace ( )
virtual

Destructor.

Member Function Documentation

◆ getBasePtr()

virtual char* nkMemory::DefaultMemorySpace::getBasePtr ( ) const
overridevirtual

See MemorySpace::getBasePtr() for more details.

◆ getOffsetPtr()

virtual char* nkMemory::DefaultMemorySpace::getOffsetPtr ( unsigned long long  offset) const
overridevirtual

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