Changeset View
Changeset View
Standalone View
Standalone View
src/support/lockedpool.cpp
Show First 20 Lines • Show All 172 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
void Win32LockedPageAllocator::FreeLocked(void *addr, size_t len) { | void Win32LockedPageAllocator::FreeLocked(void *addr, size_t len) { | ||||
len = align_up(len, page_size); | len = align_up(len, page_size); | ||||
memory_cleanse(addr, len); | memory_cleanse(addr, len); | ||||
VirtualUnlock(const_cast<void *>(addr), len); | VirtualUnlock(const_cast<void *>(addr), len); | ||||
} | } | ||||
size_t Win32LockedPageAllocator::GetLimit() { | size_t Win32LockedPageAllocator::GetLimit() { | ||||
// TODO is there a limit on windows, how to get it? | // TODO is there a limit on Windows, how to get it? | ||||
return std::numeric_limits<size_t>::max(); | return std::numeric_limits<size_t>::max(); | ||||
} | } | ||||
#endif | #endif | ||||
/*******************************************************************************/ | /*******************************************************************************/ | ||||
// Implementation: PosixLockedPageAllocator | // Implementation: PosixLockedPageAllocator | ||||
#ifndef WIN32 | #ifndef WIN32 | ||||
▲ Show 20 Lines • Show All 185 Lines • Show Last 20 Lines |