diff options
author | hunt <hunt> | 2007-01-29 20:44:38 +0000 |
---|---|---|
committer | hunt <hunt> | 2007-01-29 20:44:38 +0000 |
commit | 45cf0d811a60287a12ce1641e569034753962ade (patch) | |
tree | 78bf98a215a4b57cb06b282f832efc34f3261fae /runtime/transport/symbols.c | |
parent | 4b670dde47e0899370182f85b909bcf1f242b722 (diff) | |
download | systemtap-steved-45cf0d811a60287a12ce1641e569034753962ade.tar.gz systemtap-steved-45cf0d811a60287a12ce1641e569034753962ade.tar.xz systemtap-steved-45cf0d811a60287a12ce1641e569034753962ade.zip |
2007-01-29 Martin Hunt <hunt@redhat.com>
* procfs.c: Count allocated IO memory.
* symbols.c: Use _stp_kmalloc() and _stp_kzalloc().
* transport.c: Count allocated IO memory.
Diffstat (limited to 'runtime/transport/symbols.c')
-rw-r--r-- | runtime/transport/symbols.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c index 2aa4897e..d6d70468 100644 --- a/runtime/transport/symbols.c +++ b/runtime/transport/symbols.c @@ -63,12 +63,11 @@ static unsigned _stp_get_sym_sizes(struct module *m, unsigned *dsize) /* allocate space for a module and symbols */ static struct _stp_module * _stp_alloc_module(unsigned num, unsigned datasize) { - struct _stp_module *mod = (struct _stp_module *)kmalloc(sizeof(struct _stp_module), STP_ALLOC_FLAGS); + struct _stp_module *mod = (struct _stp_module *)_stp_kzalloc(sizeof(struct _stp_module)); if (mod == NULL) goto bad; - memset(mod, 0, sizeof(struct _stp_module)); - mod->symbols = (struct _stp_symbol *)kmalloc(num * sizeof(struct _stp_symbol), STP_ALLOC_FLAGS); + mod->symbols = (struct _stp_symbol *)_stp_kmalloc(num * sizeof(struct _stp_symbol)); if (mod->symbols == NULL) { mod->symbols = (struct _stp_symbol *)_stp_vmalloc(num * sizeof(struct _stp_symbol)); if (mod->symbols == NULL) @@ -76,7 +75,7 @@ static struct _stp_module * _stp_alloc_module(unsigned num, unsigned datasize) mod->allocated = 1; } - mod->symbol_data = kmalloc(datasize, STP_ALLOC_FLAGS); + mod->symbol_data = _stp_kmalloc(datasize); if (mod->symbol_data == NULL) { mod->symbol_data = _stp_vmalloc(datasize); if (mod->symbol_data == NULL) @@ -360,7 +359,7 @@ static int _stp_do_module(const char __user *buf, int count) return count; /* copy in section data */ - tmpmod.sections = kmalloc(count - sizeof(tmpmod), STP_ALLOC_FLAGS); + tmpmod.sections = _stp_kmalloc(count - sizeof(tmpmod)); if (tmpmod.sections == NULL) { printk("_stp_do_module: unable to allocate memory.\n"); return -EFAULT; |