summaryrefslogtreecommitdiff
path: root/src/common/HPM.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/HPM.c')
-rw-r--r--src/common/HPM.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/HPM.c b/src/common/HPM.c
index ff1371b14..1fad7102f 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -567,6 +567,7 @@ struct hplugin *hplugin_load(const char* filename)
/* id */
plugin->hpi->pid = plugin->idx;
/* core */
+ plugin->hpi->memmgr = HPMiMalloc;
#ifdef CONSOLE_INPUT
plugin->hpi->addCPCommand = console->input->addCommand;
#endif // CONSOLE_INPUT
@@ -1093,8 +1094,8 @@ void hpm_init(void)
HPM->off = false;
- memcpy(&iMalloc_HPM, iMalloc, sizeof(struct malloc_interface));
HPMiMalloc = &iMalloc_HPM;
+ *HPMiMalloc = *iMalloc;
HPMiMalloc->malloc = HPM_mmalloc;
HPMiMalloc->calloc = HPM_calloc;
HPMiMalloc->realloc = HPM_realloc;