[llvm-commits] CVS: llvm/lib/System/Win32/Memory.inc
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Fri Jul 29 16:39:37 PDT 2005
Changes in directory llvm/lib/System/Win32:
Memory.inc updated: 1.5 -> 1.6
---
Log message:
support near allocations for the JIT
---
Diffs of the changes: (+3 -1)
Memory.inc | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
Index: llvm/lib/System/Win32/Memory.inc
diff -u llvm/lib/System/Win32/Memory.inc:1.5 llvm/lib/System/Win32/Memory.inc:1.6
--- llvm/lib/System/Win32/Memory.inc:1.5 Thu May 5 17:33:09 2005
+++ llvm/lib/System/Win32/Memory.inc Fri Jul 29 18:39:25 2005
@@ -23,12 +23,14 @@
//=== 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) {
More information about the llvm-commits
mailing list