aboutsummaryrefslogtreecommitdiff
path: root/src/allocators.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/allocators.cpp')
-rw-r--r--src/allocators.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/allocators.cpp b/src/allocators.cpp
index 8ecd7206cd..dfe26f1b1e 100644
--- a/src/allocators.cpp
+++ b/src/allocators.cpp
@@ -37,13 +37,13 @@ static inline size_t GetSystemPageSize()
page_size = sSysInfo.dwPageSize;
#elif defined(PAGESIZE) // defined in limits.h
page_size = PAGESIZE;
-#else // assume some POSIX OS
+#else // assume some POSIX OS
page_size = sysconf(_SC_PAGESIZE);
#endif
return page_size;
}
-bool MemoryPageLocker::Lock(const void *addr, size_t len)
+bool MemoryPageLocker::Lock(const void* addr, size_t len)
{
#ifdef WIN32
return VirtualLock(const_cast<void*>(addr), len) != 0;
@@ -52,7 +52,7 @@ bool MemoryPageLocker::Lock(const void *addr, size_t len)
#endif
}
-bool MemoryPageLocker::Unlock(const void *addr, size_t len)
+bool MemoryPageLocker::Unlock(const void* addr, size_t len)
{
#ifdef WIN32
return VirtualUnlock(const_cast<void*>(addr), len) != 0;
@@ -64,4 +64,3 @@ bool MemoryPageLocker::Unlock(const void *addr, size_t len)
LockedPageManager::LockedPageManager() : LockedPageManagerBase<MemoryPageLocker>(GetSystemPageSize())
{
}
-