mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
commit and reserve pages when calling VirtualAlloc on Windows
This commit is contained in:
parent
0d3e6b7793
commit
bd8d1c05d0
@ -511,7 +511,8 @@ class MySystem: public System {
|
||||
virtual void* tryAllocateExecutable(unsigned sizeInBytes) {
|
||||
assert(this, sizeInBytes % LikelyPageSizeInBytes == 0);
|
||||
|
||||
return VirtualAlloc(0, sizeInBytes, MEM_RESERVE, PAGE_EXECUTE_READWRITE);
|
||||
return VirtualAlloc
|
||||
(0, sizeInBytes, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
|
||||
}
|
||||
|
||||
virtual void freeExecutable(const void* p, unsigned) {
|
||||
|
Loading…
Reference in New Issue
Block a user