diff options
| author | Glenn Rice <glennricster@gmail.com> | 2013-02-02 08:17:44 -0600 |
|---|---|---|
| committer | Glenn Rice <glennricster@gmail.com> | 2013-02-02 08:17:44 -0600 |
| commit | b13b5949054444bcce998a57784f53343a452121 (patch) | |
| tree | e6dc0db4533630a7d65cbe845a6266896b0533d2 /Source/Core/Common/Src/MemoryUtil.cpp | |
| parent | c8c75dc9a3a9746989dc345838a0f04299154fc8 (diff) | |
| parent | f7fa33f2d618206e6388cc023d17ceb6a04d6af2 (diff) | |
Merge branch 'compiler-warnings'
This shouldn't break anything so I will go ahead and merge it. Disc scrubbing is tested and works. There is a minor change to how the data is read by using the File::IOFile::ReadBytes method instead of directly using fread, but the data read is the same.
Diffstat (limited to 'Source/Core/Common/Src/MemoryUtil.cpp')
| -rw-r--r-- | Source/Core/Common/Src/MemoryUtil.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/Common/Src/MemoryUtil.cpp b/Source/Core/Common/Src/MemoryUtil.cpp index ebfa380be4..0888746d42 100644 --- a/Source/Core/Common/Src/MemoryUtil.cpp +++ b/Source/Core/Common/Src/MemoryUtil.cpp @@ -117,7 +117,8 @@ void* AllocateAlignedMemory(size_t size,size_t alignment) void* ptr = _aligned_malloc(size,alignment);
#else
void* ptr = NULL;
- posix_memalign(&ptr, alignment, size);
+ if (posix_memalign(&ptr, alignment, size) != 0)
+ ERROR_LOG(MEMMAP, "Failed to allocate aligned memory");
;
#endif
|
