Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

LockedPageAllocator Class Referenceabstract

OS-dependent allocation and deallocation of locked/pinned memory pages. More...

#include <lockedpool.h>

+ Inheritance diagram for LockedPageAllocator:

Public Member Functions

virtual ~LockedPageAllocator ()
 
virtual void * AllocateLocked (size_t len, bool *lockingSuccess)=0
 Allocate and lock memory pages. More...
 
virtual void FreeLocked (void *addr, size_t len)=0
 Unlock and free memory pages. More...
 
virtual size_t GetLimit ()=0
 Get the total limit on the amount of memory that may be locked by this process, in bytes. More...
 

Detailed Description

OS-dependent allocation and deallocation of locked/pinned memory pages.

Abstract base class.

Definition at line 18 of file lockedpool.h.

Constructor & Destructor Documentation

◆ ~LockedPageAllocator()

virtual LockedPageAllocator::~LockedPageAllocator ( )
inlinevirtual

Definition at line 21 of file lockedpool.h.

Member Function Documentation

◆ AllocateLocked()

virtual void* LockedPageAllocator::AllocateLocked ( size_t  len,
bool *  lockingSuccess 
)
pure virtual

Allocate and lock memory pages.

If len is not a multiple of the system page size, it is rounded up. Returns 0 in case of allocation failure.

If locking the memory pages could not be accomplished it will still return the memory, however the lockingSuccess flag will be false. lockingSuccess is undefined if the allocation fails.

Implemented in PosixLockedPageAllocator.

◆ FreeLocked()

virtual void LockedPageAllocator::FreeLocked ( void *  addr,
size_t  len 
)
pure virtual

Unlock and free memory pages.

Clear the memory before unlocking.

Implemented in PosixLockedPageAllocator.

◆ GetLimit()

virtual size_t LockedPageAllocator::GetLimit ( )
pure virtual

Get the total limit on the amount of memory that may be locked by this process, in bytes.

Return size_t max if there is no limit or the limit is unknown. Return 0 if no memory can be locked at all.

Implemented in PosixLockedPageAllocator.


The documentation for this class was generated from the following file:
Released under the MIT license