mirror of
https://github.com/simple64/simple64.git
synced 2026-07-26 08:34:00 +02:00
update parallel rsp
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
#include <limits>
|
||||
@@ -31,7 +32,12 @@ Allocator::~Allocator()
|
||||
|
||||
static size_t align_page(size_t offset)
|
||||
{
|
||||
return (offset + 4095) & ~size_t(4095);
|
||||
#if defined(__APPLE__) && defined(__aarch64__)
|
||||
size_t pagesize = sysconf(_SC_PAGESIZE) - 1;
|
||||
#else
|
||||
size_t pagesize = 4095;
|
||||
#endif
|
||||
return (offset + pagesize) & ~size_t(pagesize);
|
||||
}
|
||||
|
||||
static bool commit_read_write(void *ptr, size_t size)
|
||||
|
||||
Reference in New Issue
Block a user