summaryrefslogtreecommitdiff
path: root/src/common/malloc.h
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-27 16:29:44 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-27 16:29:44 +0000
commitb14ce328eaf0c82dff32ba156ec440ff1a07ac0d (patch)
tree2da3e570dda7049d4cca85c5b43e1c02577997bc /src/common/malloc.h
parent99b156f4ec91f2d52fd57aa1710ae9261b8db356 (diff)
downloadhercules-b14ce328eaf0c82dff32ba156ec440ff1a07ac0d.tar.gz
hercules-b14ce328eaf0c82dff32ba156ec440ff1a07ac0d.tar.bz2
hercules-b14ce328eaf0c82dff32ba156ec440ff1a07ac0d.tar.xz
hercules-b14ce328eaf0c82dff32ba156ec440ff1a07ac0d.zip
update
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@821 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/malloc.h')
-rw-r--r--src/common/malloc.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/common/malloc.h b/src/common/malloc.h
index 3733a5e55..7b09d7074 100644
--- a/src/common/malloc.h
+++ b/src/common/malloc.h
@@ -3,6 +3,21 @@
#include <stdlib.h>
+#if defined(GCOLLECT)
+
+#include "gc.h"
+#define aMalloc(n) GC_MALLOC(n)
+#define aCalloc(m,n) _bcalloc(m,n)
+#define aRealloc(p,n) GC_REALLOC(p,n)
+
+extern void * _bcalloc(size_t, size_t);
+
+#elif defined(BCHECK)
+#define aMalloc(n) malloc(n)
+#define aCalloc(m,n) calloc(m,n)
+#define aRealloc(p,n) realloc(p,n)
+#else
+
#if __STDC_VERSION__ < 199901L
# if __GNUC__ >= 2
# define __func__ __FUNCTION__
@@ -21,5 +36,6 @@ void* aRealloc_( void *p, size_t size, const char *file, int line, const char *f
#define aCalloc(m,n) aCalloc_(m,n,ALC_MARK)
#define aRealloc(p,n) aRealloc_(p,n,ALC_MARK)
+#endif
#endif