summaryrefslogtreecommitdiff
path: root/src/common/malloc.h
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-29 21:16:05 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-29 21:16:05 +0000
commit6fd1aaa92666b6097d6e480741490de28795a833 (patch)
tree8f1609e6f6be8a462f1ee4dba87efcad8bc6f046 /src/common/malloc.h
parentab0a9edc2f5754c4f778c008caff1682d43d65eb (diff)
downloadhercules-6fd1aaa92666b6097d6e480741490de28795a833.tar.gz
hercules-6fd1aaa92666b6097d6e480741490de28795a833.tar.bz2
hercules-6fd1aaa92666b6097d6e480741490de28795a833.tar.xz
hercules-6fd1aaa92666b6097d6e480741490de28795a833.zip
update
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@863 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/malloc.h')
-rw-r--r--src/common/malloc.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/common/malloc.h b/src/common/malloc.h
index 7b09d7074..860f8dd7b 100644
--- a/src/common/malloc.h
+++ b/src/common/malloc.h
@@ -3,8 +3,18 @@
#include <stdlib.h>
-#if defined(GCOLLECT)
+#if defined(DMALLOC)
+#include "dmalloc.h"
+
+#define aMalloc(size) \
+ dmalloc_malloc(__FILE__, __LINE__, (size), DMALLOC_FUNC_MALLOC, 0, 0)
+#define aCalloc(count,size) \
+ dmalloc_malloc(__FILE__, __LINE__, (count)*(size), DMALLOC_FUNC_CALLOC, 0, 0)
+#define aRealloc(ptr,size) \
+ dmalloc_realloc(__FILE__, __LINE__, (ptr), (size), DMALLOC_FUNC_REALLOC, 0)
+
+#elif defined(GCOLLECT)
#include "gc.h"
#define aMalloc(n) GC_MALLOC(n)
#define aCalloc(m,n) _bcalloc(m,n)