summaryrefslogtreecommitdiff
path: root/src/common/malloc.c
diff options
context:
space:
mode:
authorshennetsind <notind@gmail.com>2013-08-08 11:19:02 -0700
committershennetsind <notind@gmail.com>2013-08-08 11:19:02 -0700
commit1197e46b6ca1f399edc18fbd60a3e2c4adf6c32f (patch)
treecbfd9f0847cb5b9e65cd77ab4e8861f34165c67d /src/common/malloc.c
parentdefac0ef9714121a872ab48c3f6c4ddd177ae509 (diff)
parent04db720ee56ad8ddddf4255575c5d60e2c214a13 (diff)
downloadhercules-1197e46b6ca1f399edc18fbd60a3e2c4adf6c32f.tar.gz
hercules-1197e46b6ca1f399edc18fbd60a3e2c4adf6c32f.tar.bz2
hercules-1197e46b6ca1f399edc18fbd60a3e2c4adf6c32f.tar.xz
hercules-1197e46b6ca1f399edc18fbd60a3e2c4adf6c32f.zip
Merge pull request #83 from HerculesWS/HPMUpdateR2
Hercules Plugin Manager Update
Diffstat (limited to 'src/common/malloc.c')
-rw-r--r--src/common/malloc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/malloc.c b/src/common/malloc.c
index d629aa63f..4d2c93b77 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -11,6 +11,8 @@
#include <string.h>
#include <time.h>
+struct malloc_interface iMalloc_s;
+
////////////// Memory Libraries //////////////////
#if defined(MEMWATCH)
@@ -672,7 +674,7 @@ void memmgr_report (int extra) {
if( extra != 0 )
msize = extra;
-
+
while (block) {
if (block->unit_used) {
int i;
@@ -784,6 +786,8 @@ void malloc_final (void) {
memmgr_final ();
#endif
MEMORY_CHECK();
+ if( iMalloc->post_shutdown )
+ iMalloc->post_shutdown();
}
void malloc_init (void) {
@@ -825,4 +829,5 @@ void malloc_defaults(void) {
iMalloc->astrdup = aStrdup_;
iMalloc->free = aFree_;
#endif
+ iMalloc->post_shutdown = NULL;
}