summaryrefslogtreecommitdiff
path: root/src/win32_memory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/win32_memory.cpp')
-rw-r--r--src/win32_memory.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/win32_memory.cpp b/src/win32_memory.cpp
index dc4cd4a89..903be83e6 100644
--- a/src/win32_memory.cpp
+++ b/src/win32_memory.cpp
@@ -28,9 +28,9 @@
* when it comes to memory usage between dlls and exes.
*/
-void * ::operator new(size_t iSize)
+void *::operator new(size_t iSize)
{
- void *ptr = HeapAlloc(GetProcessHeap(), 0, iSize); /* zero memory for unix compatibility */
+ void *ptr = HeapAlloc(GetProcessHeap(), 0, iSize); /* zero memory for unix compatibility */
/* This is the correct behaviour according to C++ standards for out of memory,
* not returning null -- Brain
*/
@@ -46,7 +46,8 @@ void ::operator delete(void *ptr)
HeapFree(GetProcessHeap(), 0, ptr);
}
-void * operator new[](size_t iSize) {
+void *operator new[](size_t iSize)
+{
void *ptr = HeapAlloc(GetProcessHeap(), 0, iSize); /* Why were we initializing the memory to zeros here? This is just a waste of cpu! */
if (!ptr)
throw std::bad_alloc();