aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System/Win32/Memory.inc
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-07-29 23:40:16 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-07-29 23:40:16 +0000
commita00269bc3e97d4e53ed196325ef02e6d1f3d70dc (patch)
tree8ac8e30fc2eaea6abd4adb0eafbe4a47baf68dbe /lib/System/Win32/Memory.inc
parent422f3d58a8a9d346e0bb34f77c30184b0dfc2838 (diff)
downloadexternal_llvm-a00269bc3e97d4e53ed196325ef02e6d1f3d70dc.zip
external_llvm-a00269bc3e97d4e53ed196325ef02e6d1f3d70dc.tar.gz
external_llvm-a00269bc3e97d4e53ed196325ef02e6d1f3d70dc.tar.bz2
support near allocations for the JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Win32/Memory.inc')
-rw-r--r--lib/System/Win32/Memory.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/System/Win32/Memory.inc b/lib/System/Win32/Memory.inc
index 9ebef6a..7e93dee 100644
--- a/lib/System/Win32/Memory.inc
+++ b/lib/System/Win32/Memory.inc
@@ -23,12 +23,14 @@ using namespace sys;
//=== and must not be UNIX code
//===----------------------------------------------------------------------===//
-MemoryBlock Memory::AllocateRWX(unsigned NumBytes) {
+MemoryBlock Memory::AllocateRWX(unsigned NumBytes, const MemoryBlock* NearBlock) {
if (NumBytes == 0) return MemoryBlock();
static const long pageSize = Process::GetPageSize();
unsigned NumPages = (NumBytes+pageSize-1)/pageSize;
+ //FIXME: support NearBlock if ever needed on Win64.
+
void *pa = VirtualAlloc(NULL, NumPages*pageSize, MEM_COMMIT,
PAGE_EXECUTE_READWRITE);
if (pa == NULL) {