diff options
author | Matt Fleming <matt@console-pimps.org> | 2009-08-16 15:44:08 +0100 |
---|---|---|
committer | Matt Fleming <matt@console-pimps.org> | 2009-08-21 13:02:43 +0100 |
commit | fb3f3e7fc6d4afb32f9eba32124beaf40313de3c (patch) | |
tree | 69ed6cfbc123a188aabbe4a98209c935680c27a2 /arch/sh/include/asm/system.h | |
parent | 97f361e2498ada54b48a235619eaf5af8e46427e (diff) |
sh: unwinder: Fix memory leak and create our own kmem cache
Plug a memory leak in dwarf_unwinder_dump() where we didn't free the
memory that we had previously allocated for the DWARF frames and DWARF
registers.
Now is also a opportune time to implement our own mempool and kmem
cache. It's a good idea to have a certain number of frame and register
objects in reserve at all times, so that we are guaranteed to have our
allocation satisfied even when memory is scarce. Since we have pools to
allocate from we can implement the registers for each frame as a linked
list as opposed to a sparsely populated array. Whilst it's true that the
lookup time for a linked list is larger than for arrays, there's only
usually a maximum of 8 registers per frame. So the overhead isn't that
much of a concern.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Diffstat (limited to 'arch/sh/include/asm/system.h')
0 files changed, 0 insertions, 0 deletions