mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-29 21:42:32 +02:00
util: modify Win32LockedPageAllocator to query windows for limit
This commit is contained in:
parent
e3c08eb620
commit
1cb42aeda3
@ -202,7 +202,10 @@ void Win32LockedPageAllocator::FreeLocked(void* addr, size_t len)
|
|||||||
|
|
||||||
size_t Win32LockedPageAllocator::GetLimit()
|
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();
|
return std::numeric_limits<size_t>::max();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user