1 // Use the global heap for this process for all allocate/free operations.
\r
2 #include "inspircd_win32wrapper.h"
\r
7 void * ::operator new(size_t iSize)
\r
9 void* ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, iSize); // zero memory for unix compatibility
\r
10 /* This is the correct behaviour according to C++ standards for out of memory,
\r
11 * not returning null -- Brain*/
\r
13 throw std::bad_alloc();
\r
18 void ::operator delete(void * ptr)
\r
20 HeapFree(GetProcessHeap(), 0, ptr);
\r