aboutsummaryrefslogtreecommitdiff
path: root/src/allocators.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/allocators.cpp')
-rw-r--r--src/allocators.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/allocators.cpp b/src/allocators.cpp
index 15f34aa2c8..8ecd7206cd 100644
--- a/src/allocators.cpp
+++ b/src/allocators.cpp
@@ -46,7 +46,7 @@ static inline size_t GetSystemPageSize()
bool MemoryPageLocker::Lock(const void *addr, size_t len)
{
#ifdef WIN32
- return VirtualLock(const_cast<void*>(addr), len);
+ return VirtualLock(const_cast<void*>(addr), len) != 0;
#else
return mlock(addr, len) == 0;
#endif
@@ -55,7 +55,7 @@ bool MemoryPageLocker::Lock(const void *addr, size_t len)
bool MemoryPageLocker::Unlock(const void *addr, size_t len)
{
#ifdef WIN32
- return VirtualUnlock(const_cast<void*>(addr), len);
+ return VirtualUnlock(const_cast<void*>(addr), len) != 0;
#else
return munlock(addr, len) == 0;
#endif