summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Win32
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-03-24 21:29:58 +0000
committerOwen Anderson <resistor@mac.com>2008-03-24 21:29:58 +0000
commitc905fe9407bcad7beeb2774e2956c51ab45d2318 (patch)
tree7018d00f99dacdea7aea2911910fef23c27df565 /llvm/lib/System/Win32
parentd8cde6f45d20b060f0ad61bb3ba429610e390b89 (diff)
downloadbcm5719-llvm-c905fe9407bcad7beeb2774e2956c51ab45d2318.tar.gz
bcm5719-llvm-c905fe9407bcad7beeb2774e2956c51ab45d2318.zip
Revert r48676. I had plans for using it, but now it's just dead code.
llvm-svn: 48743
Diffstat (limited to 'llvm/lib/System/Win32')
-rw-r--r--llvm/lib/System/Win32/Memory.inc23
1 files changed, 0 insertions, 23 deletions
diff --git a/llvm/lib/System/Win32/Memory.inc b/llvm/lib/System/Win32/Memory.inc
index 12627521a3d..eed2b100e6d 100644
--- a/llvm/lib/System/Win32/Memory.inc
+++ b/llvm/lib/System/Win32/Memory.inc
@@ -46,29 +46,6 @@ MemoryBlock Memory::AllocateRWX(unsigned NumBytes,
return result;
}
-MemoryBlock Memory::AllocateRW(unsigned NumBytes,
- const MemoryBlock *NearBlock,
- std::string *ErrMsg) {
- 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_READWRITE);
- if (pa == NULL) {
- MakeErrMsg(ErrMsg, "Can't allocate RWX Memory: ");
- return MemoryBlock();
- }
-
- MemoryBlock result;
- result.Address = pa;
- result.Size = NumPages*pageSize;
- return result;
-}
-
bool Memory::ReleaseRWX(MemoryBlock &M, std::string *ErrMsg) {
if (M.Address == 0 || M.Size == 0) return false;
if (!VirtualFree(M.Address, 0, MEM_RELEASE))
OpenPOWER on IntegriCloud