mirror of
https://github.com/corda/corda.git
synced 2025-01-23 04:48:09 +00:00
Merge branch 'master' of dice:git/vm
This commit is contained in:
commit
2d042616d0
@ -503,6 +503,10 @@ class MySystem: public System {
|
|||||||
virtual void* tryAllocate(unsigned size, bool executable) {
|
virtual void* tryAllocate(unsigned size, bool executable) {
|
||||||
assert(this, (not executable) or (size % LikelyPageSizeInBytes == 0));
|
assert(this, (not executable) or (size % LikelyPageSizeInBytes == 0));
|
||||||
|
|
||||||
|
#ifndef MAP_32BIT
|
||||||
|
#define MAP_32BIT 0
|
||||||
|
#endif
|
||||||
|
|
||||||
if (executable) {
|
if (executable) {
|
||||||
void* p = mmap(0, size, PROT_EXEC | PROT_READ | PROT_WRITE,
|
void* p = mmap(0, size, PROT_EXEC | PROT_READ | PROT_WRITE,
|
||||||
MAP_PRIVATE | MAP_ANONYMOUS | MAP_32BIT, -1, 0);
|
MAP_PRIVATE | MAP_ANONYMOUS | MAP_32BIT, -1, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user