diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-27 10:38:21 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-27 10:38:21 +0000 |
commit | 27c16626a2676237521604c7f852d786317b03f5 (patch) | |
tree | 44a48da886d47d52713bbe87222a4091da4c35b4 | |
parent | b3574d7f0a8565ecc46bc6ba8d128688156b6331 (diff) | |
download | hercules-27c16626a2676237521604c7f852d786317b03f5.tar.gz hercules-27c16626a2676237521604c7f852d786317b03f5.tar.bz2 hercules-27c16626a2676237521604c7f852d786317b03f5.tar.xz hercules-27c16626a2676237521604c7f852d786317b03f5.zip |
Some minor changes to do_init_memmgr
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1308 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | src/common/core.c | 2 | ||||
-rw-r--r-- | src/common/malloc.c | 7 | ||||
-rw-r--r-- | src/common/malloc.h | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/common/core.c b/src/common/core.c index 03945040a..41b73b219 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -286,10 +286,8 @@ int main(int argc,char **argv) int next; display_title(); -#ifdef USE_MEMMGR // call this first so it'll be finalised last do_init_memmgr(argv[0]); // 一番最初に実行する必要がある -#endif sscanf(argv[0], "./%24[^\n]", server_type); // map/char/login? atexit(log_uptime); diff --git a/src/common/malloc.c b/src/common/malloc.c index 703933d01..747423b47 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -7,6 +7,9 @@ #include "memwatch.h" #endif +// 独自メモリマネージャを使用する場合、次のコメントを外してください。 +// #define USE_MEMMGR + #if !defined(DMALLOC) && !defined(GCOLLECT) && !defined(BCHECK) && !defined(USE_MEMMGR) void* aMalloc_( size_t size, const char *file, int line, const char *func ) @@ -90,10 +93,6 @@ void aFree_( void *p, const char *file, int line, const char *func ) #endif } -int do_init_memmgr(const char* file) { - return 0; -} - #elif defined(GCOLLECT) void * _bcallocA(size_t size, size_t cnt) { diff --git a/src/common/malloc.h b/src/common/malloc.h index eec138cdd..c59c08a4e 100644 --- a/src/common/malloc.h +++ b/src/common/malloc.h @@ -75,6 +75,10 @@ #endif -int do_init_memmgr(const char* file); +#ifndef USE_MEMMGR + #define do_init_memmgr(file) +#else + int do_init_memmgr(const char* file); +#endif #endif |