summaryrefslogtreecommitdiffstats
path: root/src/common/memory_util.cpp
diff options
context:
space:
mode:
authorRohit Nirmal <rohitnirmal9@gmail.com>2014-12-03 19:57:57 +0100
committerRohit Nirmal <rohitnirmal9@gmail.com>2014-12-03 19:57:57 +0100
commit8a624239703c046d89ebeaf3ea13c87af75b550f (patch)
tree19546d2b06c71add6140f322a8aab0c918bbd9ca /src/common/memory_util.cpp
parentMerge pull request #236 from rohit-n/sign-compare (diff)
downloadyuzu-8a624239703c046d89ebeaf3ea13c87af75b550f.tar
yuzu-8a624239703c046d89ebeaf3ea13c87af75b550f.tar.gz
yuzu-8a624239703c046d89ebeaf3ea13c87af75b550f.tar.bz2
yuzu-8a624239703c046d89ebeaf3ea13c87af75b550f.tar.lz
yuzu-8a624239703c046d89ebeaf3ea13c87af75b550f.tar.xz
yuzu-8a624239703c046d89ebeaf3ea13c87af75b550f.tar.zst
yuzu-8a624239703c046d89ebeaf3ea13c87af75b550f.zip
Diffstat (limited to 'src/common/memory_util.cpp')
-rw-r--r--src/common/memory_util.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/memory_util.cpp b/src/common/memory_util.cpp
index b6f66e4e1..93da5500b 100644
--- a/src/common/memory_util.cpp
+++ b/src/common/memory_util.cpp
@@ -93,7 +93,7 @@ void* AllocateMemoryPages(size_t size)
// printf("Mapped memory at %p (size %ld)\n", ptr,
// (unsigned long)size);
- if (ptr == NULL)
+ if (ptr == nullptr)
PanicAlert("Failed to allocate raw memory");
return ptr;
@@ -104,7 +104,7 @@ void* AllocateAlignedMemory(size_t size,size_t alignment)
#ifdef _WIN32
void* ptr = _aligned_malloc(size,alignment);
#else
- void* ptr = NULL;
+ void* ptr = nullptr;
#ifdef ANDROID
ptr = memalign(alignment, size);
#else
@@ -116,7 +116,7 @@ void* AllocateAlignedMemory(size_t size,size_t alignment)
// printf("Mapped memory at %p (size %ld)\n", ptr,
// (unsigned long)size);
- if (ptr == NULL)
+ if (ptr == nullptr)
PanicAlert("Failed to allocate aligned memory");
return ptr;
@@ -130,7 +130,7 @@ void FreeMemoryPages(void* ptr, size_t size)
if (!VirtualFree(ptr, 0, MEM_RELEASE))
PanicAlert("FreeMemoryPages failed!\n%s", GetLastErrorMsg());
- ptr = NULL; // Is this our responsibility?
+ ptr = nullptr; // Is this our responsibility?
#else
munmap(ptr, size);
@@ -184,7 +184,7 @@ std::string MemUsage()
// Print information about the memory usage of the process.
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, processID);
- if (NULL == hProcess) return "MemUsage Error";
+ if (nullptr == hProcess) return "MemUsage Error";
if (GetProcessMemoryInfo(hProcess, &pmc, sizeof(pmc)))
Ret = Common::StringFromFormat("%s K", Common::ThousandSeparate(pmc.WorkingSetSize / 1024, 7).c_str());