0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-08 10:31:50 -05:00

util: modify Win32LockedPageAllocator to query windows for limit

This commit is contained in:
Oskar Mendel 2022-06-10 14:44:23 +02:00
parent e3c08eb620
commit 1cb42aeda3
No known key found for this signature in database
GPG key ID: E5374B39294A8EDD

View file

@ -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