diff options
author | Matt Fleming <matt@console-pimps.org> | 2009-08-16 16:44:08 +0200 |
---|---|---|
committer | Matt Fleming <matt@console-pimps.org> | 2009-08-21 14:02:43 +0200 |
commit | fb3f3e7fc6d4afb32f9eba32124beaf40313de3c (patch) | |
tree | 69ed6cfbc123a188aabbe4a98209c935680c27a2 /Documentation/console | |
parent | sh: unwinder: Move initialization to early_initcall() and tidy up locking. (diff) | |
download | linux-fb3f3e7fc6d4afb32f9eba32124beaf40313de3c.tar.xz linux-fb3f3e7fc6d4afb32f9eba32124beaf40313de3c.zip |
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 'Documentation/console')
0 files changed, 0 insertions, 0 deletions