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:
parent
e3c08eb620
commit
1cb42aeda3
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue