openTRI
0.1
triMemory.h
1
/*
2
Copyright (C) 2000-2007 Tomas Jakobsson.
3
4
triMemory.h
5
*/
6
7
#ifndef __TRIMEMORY_H__
8
#define __TRIMEMORY_H__
9
10
#include <malloc.h>
11
#include "triTypes.h"
12
13
#ifdef _DEBUG_MEMORY
14
15
extern
triBool triMemoryInit (
void
);
16
extern
void
triMemoryShutdown (
void
);
17
extern
void
* triMemoryAlloc (triU32 Size,
const
triChar* pName,
const
triU32 Line);
18
extern
void
triMemoryFree (
void
* pAddress,
const
triChar* pName,
const
triU32 Line);
19
extern
triBool triMemoryCheck (
void
);
20
extern
triU32 triMemoryGetUsage (
void
);
21
22
#define triMalloc(Size) triMemoryAlloc(Size, __FILE__, __LINE__)
23
#define triFree(pAddress) triMemoryFree(pAddress, __FILE__, __LINE__)
24
25
#else
// _DEBUG_MEMORY
26
27
#define triMemoryInit() (void)1
28
#define triMemoryShutdown()
29
#define triMemoryCheck() (void)1
30
#define triMemoryGetUsage() (void)0
31
32
#define triMalloc(Size) malloc(Size)
33
#define triFree(pAddress) free(pAddress)
34
35
#endif
// _DEBUG_MEMORY
36
37
#endif
// __TRIMEMORY_H__
Generated by
1.12.0