From c778d1258a3d778d0a6227b632ba5091a0eb25a0 Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 19 May 2007 16:01:06 +0000 Subject: Helps if I add the w32 specific code, too. :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7044 e03df62e-2008-0410-955e-edbf42e46eb7 --- win/inspircd_memory_functions.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 win/inspircd_memory_functions.cpp (limited to 'win/inspircd_memory_functions.cpp') diff --git a/win/inspircd_memory_functions.cpp b/win/inspircd_memory_functions.cpp new file mode 100644 index 000000000..d03330bf5 --- /dev/null +++ b/win/inspircd_memory_functions.cpp @@ -0,0 +1,12 @@ +// Use the global heap for this process for all allocate/free operations. +#include "inspircd_win32wrapper.h" + +void * ::operator new(size_t iSize) +{ + return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, iSize); // zero memory for unix compatibility +} + +void ::operator delete(void * ptr) +{ + HeapFree(GetProcessHeap(), 0, ptr); +} -- cgit v1.2.3