![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#include <pagelocker.h>
Static Public Member Functions | |
static LockedPageManager & | Instance () |
Private Member Functions | |
LockedPageManager () | |
Static Private Member Functions | |
static void | CreateInstance () |
Static Private Attributes | |
static LockedPageManager * | _instance = NULL |
static boost::once_flag | init_flag = BOOST_ONCE_INIT |
Additional Inherited Members | |
![]() | |
LockedPageManagerBase (size_t page_size) | |
~LockedPageManagerBase () | |
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.
Definition at line 133 of file pagelocker.h.
|
private |
Definition at line 68 of file pagelocker.cpp.
|
inlinestaticprivate |
Definition at line 145 of file pagelocker.h.
Referenced by Instance().
|
inlinestatic |
Definition at line 136 of file pagelocker.h.
Referenced by secure_allocator< T >::allocate(), CCrypter::CCrypter(), secure_allocator< T >::deallocate(), LockObject(), UnlockObject(), and CCrypter::~CCrypter().
|
staticprivate |
Definition at line 156 of file pagelocker.h.
Referenced by CreateInstance(), and Instance().
|
staticprivate |
Definition at line 157 of file pagelocker.h.
Referenced by Instance().