summaryrefslogtreecommitdiffstats
path: root/src/common/memory_util.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-09-17 15:51:47 +0200
committerGitHub <noreply@github.com>2018-09-17 15:51:47 +0200
commit076add4ccddff3940e20fc320615e3d330f77119 (patch)
treebacabcfed8665974c276489509a1caa330ad36a2 /src/common/memory_util.cpp
parentMerge pull request #1329 from raven02/bgr5a1u (diff)
parentPort #4182 from Citra: "Prefix all size_t with std::" (diff)
downloadyuzu-076add4ccddff3940e20fc320615e3d330f77119.tar
yuzu-076add4ccddff3940e20fc320615e3d330f77119.tar.gz
yuzu-076add4ccddff3940e20fc320615e3d330f77119.tar.bz2
yuzu-076add4ccddff3940e20fc320615e3d330f77119.tar.lz
yuzu-076add4ccddff3940e20fc320615e3d330f77119.tar.xz
yuzu-076add4ccddff3940e20fc320615e3d330f77119.tar.zst
yuzu-076add4ccddff3940e20fc320615e3d330f77119.zip
Diffstat (limited to 'src/common/memory_util.cpp')
-rw-r--r--src/common/memory_util.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/memory_util.cpp b/src/common/memory_util.cpp
index 09462ccee..9736fb12a 100644
--- a/src/common/memory_util.cpp
+++ b/src/common/memory_util.cpp
@@ -25,7 +25,7 @@
// This is purposely not a full wrapper for virtualalloc/mmap, but it
// provides exactly the primitive operations that Dolphin needs.
-void* AllocateExecutableMemory(size_t size, bool low) {
+void* AllocateExecutableMemory(std::size_t size, bool low) {
#if defined(_WIN32)
void* ptr = VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
#else
@@ -74,7 +74,7 @@ void* AllocateExecutableMemory(size_t size, bool low) {
return ptr;
}
-void* AllocateMemoryPages(size_t size) {
+void* AllocateMemoryPages(std::size_t size) {
#ifdef _WIN32
void* ptr = VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_READWRITE);
#else
@@ -90,7 +90,7 @@ void* AllocateMemoryPages(size_t size) {
return ptr;
}
-void* AllocateAlignedMemory(size_t size, size_t alignment) {
+void* AllocateAlignedMemory(std::size_t size, std::size_t alignment) {
#ifdef _WIN32
void* ptr = _aligned_malloc(size, alignment);
#else
@@ -109,7 +109,7 @@ void* AllocateAlignedMemory(size_t size, size_t alignment) {
return ptr;
}
-void FreeMemoryPages(void* ptr, size_t size) {
+void FreeMemoryPages(void* ptr, std::size_t size) {
if (ptr) {
#ifdef _WIN32
if (!VirtualFree(ptr, 0, MEM_RELEASE))
@@ -130,7 +130,7 @@ void FreeAlignedMemory(void* ptr) {
}
}
-void WriteProtectMemory(void* ptr, size_t size, bool allowExecute) {
+void WriteProtectMemory(void* ptr, std::size_t size, bool allowExecute) {
#ifdef _WIN32
DWORD oldValue;
if (!VirtualProtect(ptr, size, allowExecute ? PAGE_EXECUTE_READ : PAGE_READONLY, &oldValue))
@@ -140,7 +140,7 @@ void WriteProtectMemory(void* ptr, size_t size, bool allowExecute) {
#endif
}
-void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute) {
+void UnWriteProtectMemory(void* ptr, std::size_t size, bool allowExecute) {
#ifdef _WIN32
DWORD oldValue;
if (!VirtualProtect(ptr, size, allowExecute ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE,