mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-05 18:23:03 +01:00
util: modify Win32LockedPageAllocator to query windows for limit
This commit is contained in:
@@ -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<size_t>::max();
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user