summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc/free.c
AgeCommit message (Collapse)Author
2012-06-15malloc: use uClibc_mutex.h provided macros consequentlyPeter S. Mazinger
use the __UCLIBC_MUTEX macros remove unused code remove duplicated code (likely,unlikely) hide internal __x() functions (mainly debug related) Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-12-19malloc: fix race condition and other bugs in the no-mmu mallocFreeman Wang
Fixes multiple race conditions on mmb list. This was done by making the mmb_heap_lock into a recursive lock and making the regular heap_lock extend to cover the mmb heap handling. Also move the new_mmb allocation up to before the mmb list is iterated through to find the insertion point. When the mmb_heap also runs out and needs to be extended when the regular heap is just extended, the mmb list could be messed up. Signed-off-by: Freeman Wang <xwang@ubicom.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-09-18trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer
sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2008-11-26- revert 24148:24151Bernhard Reutner-Fischer
2008-11-25- remove some bloat that was added in r23660 and subsequent r23698.Bernhard Reutner-Fischer
The sbrk lock is only needed for LT.old
2008-11-20Last portion of libc_hidden_proto removal.Denis Vlasenko
Appears to build fine (several .configs tried)
2008-11-20next portion of libc_hidden_proto removalDenis Vlasenko
2008-10-28Finally fix the MALLOC=y and MALLOC_SIMPLE=y breakage from svn 23660. (I ↵Rob Landley
found it, this is Bernhard's patch to fix it. Tested and it Works For Me (tm)).
2008-10-16This should fix malloc with debug and without threads. (Chase N Douglas)Bernhard Reutner-Fischer
This should have been in r23660. Untested.
2008-10-11Fix bug 4994 hangs on read(). I have tested the patch extensibly on ARM/LT.old.Khem Raj
Thank you Chase Douglas for reporting it and for the patch.
2007-04-13fix up malloc debug buildingMike Frysinger
2006-01-14hidden_def/hidden_proto: convert all users (I hope) termios split, add some ↵Peter S. Mazinger
missing headers, other jump relocs removed
2005-12-13__malloc_consolidate is only libc internal, enable use of __sbrkPeter S. Mazinger
2005-12-04More hiding, 300 leftPeter S. Mazinger
2003-04-02(free_to_heap): Unlock the heap before returning in theMiles Bader
__UCLIBC_UCLINUX_BROKEN_MUNMAP__ case. Fix from YYang1@Winbond.com.tw.
2002-11-21Improve malloc debugging support.Miles Bader
2002-10-15Fix locking to not deadlock when __UCLIBC_UCLINUX_BROKEN_MUNMAP__ is defined.Miles Bader
2002-10-09* Add support for uClinux's broken munmap, contingent onMiles Bader
__UCLIBC_UCLINUX_BROKEN_MUNMAP__ (which is currently not defined anywhere). This makes other cases a tiny bit less efficient too. * Move the malloc lock into the heap structure (locking is still done at the malloc level though, not by the heap functions). * Initialize the malloc heap to contain a tiny initial static free-area so that programs that only do a very little allocation won't ever call mmap.
2002-09-04(free):Miles Bader
Update debug statement. Update to use __heap_delete and __heap_is_empty.
2002-08-30Use `likely' & `unlikely' instead of the `__malloc_'-prefixed versions.Miles Bader
2002-08-14Use __malloc_unlikely instead of `likely'.Miles Bader
2002-08-13Use `return' for null pointers, to avoid a giant block holding the restMiles Bader
of the function.
2002-07-31Update debugging printfs.Miles Bader
2002-07-30Use new malloc header macros.Miles Bader
2002-07-25Size tweaks.Miles Bader
2002-07-25Miscellaneous tidying-up.Miles Bader
2002-07-25Redo the locking, so that it may actually work. Now locking is done atMiles Bader
the malloc/free level, not within the heap abstraction, and there's a separate lock to control sbrk access. Also, get rid of the separate `unmap_free_area' function in free.c, and just put the code in the `free' function directly, which saves a bunch of space (even compared to using an inline function) for some reason.
2002-07-24Misc small cleanups.Miles Bader
2002-07-23* Automatically try to unmap heap free-areas when they get very big.Miles Bader
* Instead of using mmap/munmap directly for large allocations, just use the heap for everything (this is reasonable now that heap memory can be unmapped). * Use sbrk instead of mmap/munmap on systems with an MMU.
2002-07-19Doc fix.Miles Bader
2002-07-18Miles Bader implemented a new mmap based malloc which is muchEric Andersen
smarter than the old "malloc-simple", and actually works, unlike the old "malloc". So kill the old "malloc-simple" and the old "malloc" and replace them with Miles' new malloc implementation. Update Config files to match. Thanks Miles!