diff options
author | hunt <hunt> | 2008-01-15 16:57:20 +0000 |
---|---|---|
committer | hunt <hunt> | 2008-01-15 16:57:20 +0000 |
commit | 68c2e2a316c7a22d058041dcba205b1e3309477d (patch) | |
tree | 39fca2263ea173fee015777ba8ed96f124e642dd /runtime/transport/symbols.c | |
parent | d94d159d9524a9b705c2704ca15b5014a24c923e (diff) | |
download | systemtap-steved-68c2e2a316c7a22d058041dcba205b1e3309477d.tar.gz systemtap-steved-68c2e2a316c7a22d058041dcba205b1e3309477d.tar.xz systemtap-steved-68c2e2a316c7a22d058041dcba205b1e3309477d.zip |
Add support for memory allocation tracking.
Diffstat (limited to 'runtime/transport/symbols.c')
-rw-r--r-- | runtime/transport/symbols.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c index 1d930183..a3ab5807 100644 --- a/runtime/transport/symbols.c +++ b/runtime/transport/symbols.c @@ -90,10 +90,10 @@ static struct _stp_module * _stp_alloc_module(unsigned num, unsigned datasize) bad: if (mod) { if (mod->allocated && mod->symbols) - vfree(mod->symbols); + _stp_vfree(mod->symbols); else - kfree(mod->symbols); - kfree(mod); + _stp_kfree(mod->symbols); + _stp_kfree(mod); } return NULL; } @@ -109,19 +109,19 @@ static void _stp_free_module(struct _stp_module *mod) /* free symbol memory */ if (mod->num_symbols) { if (mod->allocated & 1) - vfree(mod->symbols); + _stp_vfree(mod->symbols); else - kfree(mod->symbols); + _stp_kfree(mod->symbols); if (mod->allocated & 2) - vfree(mod->symbol_data); + _stp_vfree(mod->symbol_data); else - kfree(mod->symbol_data); + _stp_kfree(mod->symbol_data); } if (mod->sections) - kfree(mod->sections); + _stp_kfree(mod->sections); /* free module memory */ - kfree(mod); + _stp_kfree(mod); } /* Delete a module and free its memory. */ @@ -455,7 +455,7 @@ static int _stp_do_module(const char __user *buf, int count) return -EFAULT; } if (copy_from_user ((char *)tmpmod.sections, buf+sizeof(tmpmod), count-sizeof(tmpmod))) { - kfree(tmpmod.sections); + _stp_kfree(tmpmod.sections); return -EFAULT; } for (i = 0; i < tmpmod.num_sections; i++) { @@ -472,7 +472,7 @@ static int _stp_do_module(const char __user *buf, int count) /* load symbols from tmpmod.module to mod */ mod = _stp_load_module_symbols(&tmpmod); if (mod == NULL) { - kfree(tmpmod.sections); + _stp_kfree(tmpmod.sections); return 0; } |