use getpagesize on non-win32 platforms

This commit is contained in:
Anthony Pesch 2014-05-14 00:14:32 -07:00
parent 0e6c47aac5
commit 68e5833647
1 changed files with 8 additions and 0 deletions

View File

@ -9,14 +9,22 @@
#include <alloy/memory.h>
#if !XE_LIKE_WIN32
#include <unistd.h>
#endif
using namespace alloy;
Memory::Memory() :
membase_(0), reserve_address_(0) {
#if XE_LIKE_WIN32
SYSTEM_INFO si;
GetSystemInfo(&si);
system_page_size_ = si.dwPageSize;
#else
system_page_size_ = getpagesize();
#endif
}
Memory::~Memory() {