summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/MemoryUtil.cpp
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2008-12-19 21:24:52 +0000
committerhrydgard <hrydgard@gmail.com>2008-12-19 21:24:52 +0000
commit104acd5bc186f1623306af6f1c6ddb233fad0780 (patch)
tree828052a01f34f491714cd7f87d83955de8d5a39c /Source/Core/Common/Src/MemoryUtil.cpp
parentb5dcdcf779a7cc3db9d10f9794bbedbd7a4f7045 (diff)
Turn the X86 emitter into a class, so the code pointer is no longer a global, yay! Created XCodeBlock that derives from XEmitter, and the Jit now derives from XCodeBlock so it can call all ADD SUB JNZ etc without having to prefix them with "emit.". I think someone's gonna like this.
There's some cleanup still to be done, but hey, it works. There shouldn't be a noticable speed difference. I hope GCC doesn't have a problem with the "member function pointers" I used. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1594 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/MemoryUtil.cpp')
-rw-r--r--Source/Core/Common/Src/MemoryUtil.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/Common/Src/MemoryUtil.cpp b/Source/Core/Common/Src/MemoryUtil.cpp
index 10cf448f06..7dc0d787e4 100644
--- a/Source/Core/Common/Src/MemoryUtil.cpp
+++ b/Source/Core/Common/Src/MemoryUtil.cpp
@@ -38,7 +38,7 @@
// This is purposedely not a full wrapper for virtualalloc/mmap, but it
// provides exactly the primitive operations that Dolphin needs.
-void* AllocateExecutableMemory(int size, bool low)
+void* AllocateExecutableMemory(size_t size, bool low)
{
#ifdef _WIN32
void* ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
@@ -71,7 +71,7 @@ void* AllocateExecutableMemory(int size, bool low)
}
-void* AllocateMemoryPages(int size)
+void* AllocateMemoryPages(size_t size)
{
#ifdef _WIN32
void* ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);
@@ -99,7 +99,7 @@ void* AllocateMemoryPages(int size)
}
-void FreeMemoryPages(void* ptr, int size)
+void FreeMemoryPages(void* ptr, size_t size)
{
#ifdef _WIN32
if (ptr)
@@ -113,7 +113,7 @@ void FreeMemoryPages(void* ptr, int size)
}
-void WriteProtectMemory(void* ptr, int size, bool allowExecute)
+void WriteProtectMemory(void* ptr, size_t size, bool allowExecute)
{
#ifdef _WIN32
VirtualProtect(ptr, size, allowExecute ? PAGE_EXECUTE_READ : PAGE_READONLY, 0);
@@ -123,7 +123,7 @@ void WriteProtectMemory(void* ptr, int size, bool allowExecute)
}
-void UnWriteProtectMemory(void* ptr, int size, bool allowExecute)
+void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute)
{
#ifdef _WIN32
VirtualProtect(ptr, size, allowExecute ? PAGE_EXECUTE_READWRITE : PAGE_READONLY, 0);