summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHaruna <haru@dotalux.com>2014-12-02 10:46:01 +0100
committerHaruna <haru@dotalux.com>2014-12-02 10:46:01 +0100
commitdae167864b5892e9065d7beb276362b80618c7c4 (patch)
tree2be299a5302b105d3a4cc9fec3a449e100c8fcdb /src
parent15a1e42cb2a8513e61d5c0039a86ee964976325b (diff)
parent397c357c13775d4e2375132129e830b86a7d049f (diff)
downloadhercules-dae167864b5892e9065d7beb276362b80618c7c4.tar.gz
hercules-dae167864b5892e9065d7beb276362b80618c7c4.tar.bz2
hercules-dae167864b5892e9065d7beb276362b80618c7c4.tar.xz
hercules-dae167864b5892e9065d7beb276362b80618c7c4.zip
Merge pull request #406 from 4144/memmamanger
Fix compilation without memory manager.
Diffstat (limited to 'src')
-rw-r--r--src/common/console.c2
-rw-r--r--src/common/malloc.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/common/console.c b/src/common/console.c
index 577d1a3f0..6c5a5c886 100644
--- a/src/common/console.c
+++ b/src/common/console.c
@@ -112,7 +112,9 @@ CPCMD_C(ers_report,server) {
* Displays memory usage
**/
CPCMD_C(mem_report,server) {
+#ifdef USE_MEMMGR
memmgr_report(line?atoi(line):0);
+#endif
}
/**
diff --git a/src/common/malloc.c b/src/common/malloc.c
index 625875b76..244b1114c 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -822,8 +822,10 @@ void malloc_final (void) {
}
void malloc_init (void) {
+#ifdef USE_MEMMGR
memmgr_usage_bytes_t = 0;
memmgr_usage_bytes = 0;
+#endif
#if defined(DMALLOC) && defined(CYGWIN)
// http://dmalloc.com/docs/latest/online/dmalloc_19.html
dmalloc_debug_setup(getenv("DMALLOC_OPTIONS"));