qmalloc.h 398 Bytes
Newer Older
qon's avatar
qon committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdlib.h>

#ifndef QMALLOC_H
#define QMALLOC_H

class qmalloc
{
public:
	static void* qMalloc(size_t size, bool huge, bool executable, bool locked, void* alloc_addr = NULL, int interleave = false);
	static int qFree(void* ptr);

private:	
	static int qMallocCount;
	static int qMallocUsed;
	struct qMallocData
	{
		void* addr;
		size_t size;
	};
	static qMallocData* qMallocs;
};

#endif