summaryrefslogtreecommitdiff
path: root/win/inspircd_memory_functions.cpp
blob: d03330bf5c60a4d9bcdc3c02d71ca100c791b8a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
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);
}