hdac SDK
SDK for hdac blockchain development
|
#include <allocators.h>
정적 Public 멤버 함수 | |
static LockedPageManager & | Instance () |
추가로 상속된 멤버들 | |
![]() | |
LockedPageManagerBase (size_t page_size) | |
void | LockRange (void *p, size_t size) |
void | UnlockRange (void *p, size_t size) |
int | GetLockedPageCount () |
Singleton class to keep track of locked (ie, non-swappable) memory pages, for use in std::allocator templates.
Some implementations of the STL allocate memory in some constructors (i.e., see MSVC's vector<T> implementation where it allocates 1 byte of memory in the allocator.) Due to the unpredictable order of static initializers, we have to make sure the LockedPageManager instance exists before any other STL-based objects that use secure_allocator are created. So instead of having LockedPageManager also be static-initialized, it is created on demand.