diff --git a/src/support/lockedpool.cpp b/src/support/lockedpool.cpp index 6907749c6d..b7ef479675 100644 --- a/src/support/lockedpool.cpp +++ b/src/support/lockedpool.cpp @@ -202,7 +202,10 @@ void Win32LockedPageAllocator::FreeLocked(void* addr, size_t len) size_t Win32LockedPageAllocator::GetLimit() { - // TODO is there a limit on Windows, how to get it? + size_t min, max; + if(GetProcessWorkingSetSize(GetCurrentProcess(), &min, &max) != 0) { + return min; + } return std::numeric_limits::max(); } #endif