Make __free_tagged actually free memory
authorSebastian Herbszt <herbszt@gmx.de>
Tue, 27 Jul 2010 12:46:57 +0000 (14:46 +0200)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 27 Jul 2010 17:13:06 +0000 (10:13 -0700)
commit5eb4ed5ce84c1dce191fe4f83b58601c1e506479
tree30ed24ce8a10ce422541cde2b0b40a86192cacd0
parent9d9525aba8b8aece54b4c3b45245eb050e961ed5
Make __free_tagged actually free memory

__free_tagged called by comboot_cleanup_lowmem (core/mem/free.c) doesn't
seem to work correctly. Memory allocated with lmalloc() isn't marked as free
after the allocating module exits:

boot: mem
lowmem_buf: 0x000353e0
boot: mem
lowmem_buf: 0x000553f0
boot: mem
lowmem_buf: 0x00075400
boot: mem
lowmem_buf: 0x00000000
boot:

The expected behaviour

boot: mem
lowmem_buf: 0x000353e0
boot: mem
lowmem_buf: 0x000353e0
boot: mem
lowmem_buf: 0x000353e0

can be achieved with the following patch.
core/mem/free.c