summaryrefslogtreecommitdiff
path: root/src/common/malloc.h
diff options
context:
space:
mode:
authorbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-05 02:53:33 +0000
committerbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-05 02:53:33 +0000
commit60a426c0742b3e7d8c5b557c7578df6eeeea377b (patch)
tree5d01f9ccc2798309f9b13f07c0096ed97c6a85c8 /src/common/malloc.h
parent621db2441f69736a6c8f10d26bf966d5414fac74 (diff)
downloadhercules-60a426c0742b3e7d8c5b557c7578df6eeeea377b.tar.gz
hercules-60a426c0742b3e7d8c5b557c7578df6eeeea377b.tar.bz2
hercules-60a426c0742b3e7d8c5b557c7578df6eeeea377b.tar.xz
hercules-60a426c0742b3e7d8c5b557c7578df6eeeea377b.zip
- Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).
[16969:16991/trunk/src/] will be re-committed in the next 24 hours. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16992 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/malloc.h')
-rw-r--r--src/common/malloc.h58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/common/malloc.h b/src/common/malloc.h
index 58dcee6d7..6b4e8e5c4 100644
--- a/src/common/malloc.h
+++ b/src/common/malloc.h
@@ -33,31 +33,31 @@
#undef LOG_MEMMGR
#endif
-# define aMalloc(n) _mmalloc(n,ALC_MARK)
-# define aCalloc(m,n) _mcalloc(m,n,ALC_MARK)
-# define aRealloc(p,n) _mrealloc(p,n,ALC_MARK)
-# define aStrdup(p) _mstrdup(p,ALC_MARK)
-# define aFree(p) _mfree(p,ALC_MARK)
-
-void *_mmalloc(size_t size, const char *file, int line, const char *func);
-void *_mcalloc(size_t num, size_t size, const char *file, int line, const char *func);
-void *_mrealloc(void *p, size_t size, const char *file, int line, const char *func);
-char *_mstrdup(const char *p, const char *file, int line, const char *func);
-void _mfree(void *p, const char *file, int line, const char *func);
+# define aMalloc(n) _mmalloc(n,ALC_MARK)
+# define aCalloc(m,n) _mcalloc(m,n,ALC_MARK)
+# define aRealloc(p,n) _mrealloc(p,n,ALC_MARK)
+# define aStrdup(p) _mstrdup(p,ALC_MARK)
+# define aFree(p) _mfree(p,ALC_MARK)
+
+ void* _mmalloc (size_t size, const char *file, int line, const char *func);
+ void* _mcalloc (size_t num, size_t size, const char *file, int line, const char *func);
+ void* _mrealloc (void *p, size_t size, const char *file, int line, const char *func);
+ char* _mstrdup (const char *p, const char *file, int line, const char *func);
+ void _mfree (void *p, const char *file, int line, const char *func);
#else
-# define aMalloc(n) aMalloc_((n),ALC_MARK)
-# define aCalloc(m,n) aCalloc_((m),(n),ALC_MARK)
-# define aRealloc(p,n) aRealloc_(p,n,ALC_MARK)
-# define aStrdup(p) aStrdup_(p,ALC_MARK)
-# define aFree(p) aFree_(p,ALC_MARK)
+# define aMalloc(n) aMalloc_((n),ALC_MARK)
+# define aCalloc(m,n) aCalloc_((m),(n),ALC_MARK)
+# define aRealloc(p,n) aRealloc_(p,n,ALC_MARK)
+# define aStrdup(p) aStrdup_(p,ALC_MARK)
+# define aFree(p) aFree_(p,ALC_MARK)
-void *aMalloc_(size_t size, const char *file, int line, const char *func);
-void *aCalloc_(size_t num, size_t size, const char *file, int line, const char *func);
-void *aRealloc_(void *p, size_t size, const char *file, int line, const char *func);
-char *aStrdup_(const char *p, const char *file, int line, const char *func);
-void aFree_(void *p, const char *file, int line, const char *func);
+ void* aMalloc_ (size_t size, const char *file, int line, const char *func);
+ void* aCalloc_ (size_t num, size_t size, const char *file, int line, const char *func);
+ void* aRealloc_ (void *p, size_t size, const char *file, int line, const char *func);
+ char* aStrdup_ (const char *p, const char *file, int line, const char *func);
+ void aFree_ (void *p, const char *file, int line, const char *func);
#endif
@@ -66,13 +66,13 @@ void aFree_(void *p, const char *file, int line, const char *func);
#ifdef __GNUC__ // GCC has variable length arrays
-#define CREATE_BUFFER(name, type, size) type name[size]
-#define DELETE_BUFFER(name)
+ #define CREATE_BUFFER(name, type, size) type name[size]
+ #define DELETE_BUFFER(name)
#else // others don't, so we emulate them
-#define CREATE_BUFFER(name, type, size) type *name = (type *) aCalloc (size, sizeof(type))
-#define DELETE_BUFFER(name) aFree(name)
+ #define CREATE_BUFFER(name, type, size) type *name = (type *) aCalloc (size, sizeof(type))
+ #define DELETE_BUFFER(name) aFree(name)
#endif
@@ -84,9 +84,9 @@ void aFree_(void *p, const char *file, int line, const char *func);
////////////////////////////////////////////////
void malloc_memory_check(void);
-bool malloc_verify_ptr(void *ptr);
-size_t malloc_usage(void);
-void malloc_init(void);
-void malloc_final(void);
+bool malloc_verify_ptr(void* ptr);
+size_t malloc_usage (void);
+void malloc_init (void);
+void malloc_final (void);
#endif /* _MALLOC_H_ */