diff options
author | Oskar Mendel <brokenprogrammer@gmail.com> | 2022-06-10 14:44:23 +0200 |
---|---|---|
committer | Oskar Mendel <brokenprogrammer@gmail.com> | 2022-06-10 14:44:23 +0200 |
commit | 1cb42aeda37f4979923cd7e1c85febe994480de6 (patch) | |
tree | 16fb44acb5de5b03ae7f18a344d139eaab6c4ac9 /src/support | |
parent | e3c08eb620a2f317fc09fdf20969fa26f02afb91 (diff) |
util: modify Win32LockedPageAllocator to query windows for limit
Diffstat (limited to 'src/support')
-rw-r--r-- | src/support/lockedpool.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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<size_t>::max(); } #endif |