summaryrefslogtreecommitdiffstats
path: root/src/common/memory_util.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2015-09-12 05:04:19 +0200
committerLioncash <mathew1800@gmail.com>2015-09-12 05:11:01 +0200
commit07bfe0abbb40d7131bbf12beb9eb829dbd8fb53b (patch)
tree7a17a8078e8b65765d369b4cfa2c34120aec11d6 /src/common/memory_util.cpp
parentMerge pull request #1151 from lioncash/return (diff)
downloadyuzu-07bfe0abbb40d7131bbf12beb9eb829dbd8fb53b.tar
yuzu-07bfe0abbb40d7131bbf12beb9eb829dbd8fb53b.tar.gz
yuzu-07bfe0abbb40d7131bbf12beb9eb829dbd8fb53b.tar.bz2
yuzu-07bfe0abbb40d7131bbf12beb9eb829dbd8fb53b.tar.lz
yuzu-07bfe0abbb40d7131bbf12beb9eb829dbd8fb53b.tar.xz
yuzu-07bfe0abbb40d7131bbf12beb9eb829dbd8fb53b.tar.zst
yuzu-07bfe0abbb40d7131bbf12beb9eb829dbd8fb53b.zip
Diffstat (limited to '')
-rw-r--r--src/common/memory_util.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/memory_util.cpp b/src/common/memory_util.cpp
index 5ef784224..b299b0f0f 100644
--- a/src/common/memory_util.cpp
+++ b/src/common/memory_util.cpp
@@ -28,9 +28,9 @@
void* AllocateExecutableMemory(size_t size, bool low)
{
#if defined(_WIN32)
- void* ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
+ void* ptr = VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
#else
- static char *map_hint = 0;
+ static char* map_hint = nullptr;
#if defined(ARCHITECTURE_X64) && !defined(MAP_32BIT)
// This OS has no flag to enforce allocation below the 4 GB boundary,
// but if we hint that we want a low address it is very likely we will
@@ -85,9 +85,9 @@ void* AllocateExecutableMemory(size_t size, bool low)
void* AllocateMemoryPages(size_t size)
{
#ifdef _WIN32
- void* ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);
+ void* ptr = VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_READWRITE);
#else
- void* ptr = mmap(0, size, PROT_READ | PROT_WRITE,
+ void* ptr = mmap(nullptr, size, PROT_READ | PROT_WRITE,
MAP_ANON | MAP_PRIVATE, -1, 0);
if (ptr == MAP_FAILED)