hdac SDK
SDK for hdac blockchain development
Public 멤버 함수 | 모든 멤버 목록
LockedPageManagerBase< Locker > 클래스 템플릿 참조

#include <allocators.h>

Public 멤버 함수

 LockedPageManagerBase (size_t page_size)
 
void LockRange (void *p, size_t size)
 
void UnlockRange (void *p, size_t size)
 
int GetLockedPageCount ()
 

상세한 설명

template<class Locker>
class LockedPageManagerBase< Locker >

Thread-safe class to keep track of locked (ie, non-swappable) memory pages.

Memory locks do not stack, that is, pages which have been locked several times by calls to mlock() will be unlocked by a single call to munlock(). This can result in keying material ending up in swap when those functions are used naively. This class simulates stacking memory locks by keeping a counter per page.

주의
By using a map from each page base address to lock count, this class is optimized for small objects that span up to a few pages, mostly smaller than a page. To support large allocations, something like an interval tree would be the preferred data structure.

이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: