Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | malloc: fix race condition and other bugs in the no-mmu malloc | Freeman Wang | 2009-12-19 | 1 | -3/+4 |
| | | | | | | | | | | | | | | 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> | ||||
* | nommu: use MAP_UNINITIALIZE for mallocs | Mike Frysinger | 2009-11-23 | 1 | -1/+1 |
| | | | | | | | | | Now that the kernel supports MAP_UNINITIALIZE, have the malloc places use it to get real uninitialized memory on no-mmu systems. This avoids a lot of normally useless overhead involved in zeroing out all of the memory (sometimes multiple times). Signed-off-by: Mike Frysinger <vapier@gentoo.org> | ||||
* | trim Experimentally off and uncommented hidden | Bernhard Reutner-Fischer | 2009-09-18 | 1 | -2/+0 |
| | | | | | | | | 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> | ||||
* | - revert 24148:24151 | Bernhard Reutner-Fischer | 2008-11-26 | 1 | -4/+4 |
| | |||||
* | - remove some bloat that was added in r23660 and subsequent r23698. | Bernhard Reutner-Fischer | 2008-11-25 | 1 | -4/+4 |
| | | | | The sbrk lock is only needed for LT.old | ||||
* | next portion of libc_hidden_proto removal | Denis Vlasenko | 2008-11-20 | 1 | -2/+2 |
| | |||||
* | - fix another fallout from r23660 | Bernhard Reutner-Fischer | 2008-10-29 | 1 | -1/+1 |
| | |||||
* | Finally fix the MALLOC=y and MALLOC_SIMPLE=y breakage from svn 23660. (I ↵ | Rob Landley | 2008-10-28 | 1 | -18/+15 |
| | | | | found it, this is Bernhard's patch to fix it. Tested and it Works For Me (tm)). | ||||
* | This should fix malloc with debug and without threads. (Chase N Douglas) | Bernhard Reutner-Fischer | 2008-10-16 | 1 | -5/+21 |
| | | | | This should have been in r23660. Untested. | ||||
* | Fix bug 4994 hangs on read(). I have tested the patch extensibly on ARM/LT.old. | Khem Raj | 2008-10-11 | 1 | -9/+11 |
| | | | | | Thank you Chase Douglas for reporting it and for the patch. | ||||
* | Introduce and use small[u]int type. Changes in size: | Denis Vlasenko | 2008-05-20 | 1 | -1/+1 |
| | | | | | | | | | | | | | | - 79 0 28 107 6b libc/inet/rpc/create_xid.o + 76 0 25 101 65 libc/inet/rpc/create_xid.o - 126 0 4 130 82 libc/misc/assert/__assert.o + 123 0 1 124 7c libc/misc/assert/__assert.o - 648 4 24 676 2a4 libc/misc/internals/__uClibc_main.o + 645 4 21 670 29e libc/misc/internals/__uClibc_main.o - 230 0 4 234 ea libc/stdlib/abort.o + 216 0 1 217 d9 libc/stdlib/abort.o - 129 0 4 133 85 libc/termios/tcgetsid.o + 126 0 1 127 7f libc/termios/tcgetsid.o | ||||
* | fix up malloc debug building | Mike Frysinger | 2007-04-13 | 1 | -1/+1 |
| | |||||
* | POSIX requires that errno be set whenever 0 is returned by malloc() | Mike Frysinger | 2007-04-02 | 1 | -1/+1 |
| | |||||
* | tweak the idea between having a MMU and actually using it | Mike Frysinger | 2006-02-18 | 1 | -1/+1 |
| | |||||
* | hidden_def/hidden_proto: convert all users (I hope) termios split, add some ↵ | Peter S. Mazinger | 2006-01-14 | 1 | -3/+3 |
| | | | | missing headers, other jump relocs removed | ||||
* | __malloc_consolidate is only libc internal, enable use of __sbrk | Peter S. Mazinger | 2005-12-13 | 1 | -0/+1 |
| | |||||
* | mmap/mremap/socket/rewind gone | Peter S. Mazinger | 2005-12-08 | 1 | -0/+2 |
| | |||||
* | Use MAP_PRIVATE whenever __ARCH_HAS_MMU__ is set. | Eric Andersen | 2004-07-15 | 1 | -1/+6 |
| | | | | Only use MAP_SHARED when mmu-less. | ||||
* | Don't set errno if for zero SIZE returns. | Miles Bader | 2003-10-16 | 1 | -11/+14 |
| | | | | Code formatting cleanup. | ||||
* | Fix errno values. Fix MALLOC_GLIBC_COMPAT handling in malloc/malloc.c, | Eric Andersen | 2003-09-06 | 1 | -6/+18 |
| | | | | | which was reversed. Provide more consistancy between implementations. Handle it when people do stupid things like malloc(-1); | ||||
* | Add in a MALLOC_GLIBC_COMPAT option to let people decide if they | Eric Andersen | 2003-08-08 | 1 | -0/+5 |
| | | | | want glibc style malloc(0) behavior | ||||
* | Update malloc behavior on malloc(0) to be consistant with | Eric Andersen | 2003-01-23 | 1 | -2/+5 |
| | | | | malloc-930716 behavior, i.e. return a NULL. | ||||
* | Improve malloc debugging support. | Miles Bader | 2002-11-21 | 1 | -12/+19 |
| | |||||
* | Don't infinitely recurse when trying to grow __malloc_mmb_heap. | Miles Bader | 2002-10-18 | 1 | -18/+19 |
| | |||||
* | Fix locking to not deadlock when __UCLIBC_UCLINUX_BROKEN_MUNMAP__ is defined. | Miles Bader | 2002-10-15 | 1 | -29/+22 |
| | |||||
* | * Add support for uClinux's broken munmap, contingent on | Miles Bader | 2002-10-09 | 1 | -18/+68 |
| | | | | | | | | | __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. | ||||
* | Update debugging hooks. | Miles Bader | 2002-09-06 | 1 | -0/+4 |
| | |||||
* | Use `likely' & `unlikely' instead of the `__malloc_'-prefixed versions. | Miles Bader | 2002-08-30 | 1 | -4/+4 |
| | |||||
* | (malloc): Use MALLOC_SETUP. | Miles Bader | 2002-08-19 | 1 | -3/+2 |
| | |||||
* | Add flow-control hints with __malloc_likely and __malloc_unlikely. | Miles Bader | 2002-08-14 | 1 | -5/+7 |
| | |||||
* | Update debugging printfs. | Miles Bader | 2002-07-31 | 1 | -1/+1 |
| | |||||
* | Use MALLOC_HEADER_SIZE. | Miles Bader | 2002-07-31 | 1 | -1/+1 |
| | |||||
* | MALLOC_SET_SIZE now takes the user-address rather than the base-address. | Miles Bader | 2002-07-30 | 1 | -2/+1 |
| | |||||
* | Use new malloc header macros. | Miles Bader | 2002-07-30 | 1 | -3/+4 |
| | |||||
* | Size tweaks. | Miles Bader | 2002-07-25 | 1 | -3/+4 |
| | |||||
* | Miscellaneous tidying-up. | Miles Bader | 2002-07-25 | 1 | -1/+1 |
| | |||||
* | Redo the locking, so that it may actually work. Now locking is done at | Miles Bader | 2002-07-25 | 1 | -8/+41 |
| | | | | | | | | | 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. | ||||
* | Misc small cleanups. | Miles Bader | 2002-07-24 | 1 | -1/+2 |
| | |||||
* | * Automatically try to unmap heap free-areas when they get very big. | Miles Bader | 2002-07-23 | 1 | -60/+50 |
| | | | | | | | | * 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. | ||||
* | Doc fix. | Miles Bader | 2002-07-19 | 1 | -1/+1 |
| | |||||
* | Miles Bader implemented a new mmap based malloc which is much | Eric Andersen | 2002-07-18 | 1 | -867/+94 |
| | | | | | | | 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! | ||||
* | Minor cleanup | Eric Andersen | 2001-09-29 | 1 | -1/+2 |
| | |||||
* | Update to accomodate the header file changes | Eric Andersen | 2001-09-27 | 1 | -1/+1 |
| | |||||
* | Fix up breakage resulting from flipping the sense of some defines. Change from | Eric Andersen | 2001-03-19 | 1 | -9/+10 |
| | | | | | | | | defining things to "0" in the disabled case to outright undefining them, lest code that does an "#ifdef FOO" get inadvertantly triggered. Remove now unneeded lines from Rules.mak which makes the command line smaller and avoids redundancy (since this stuff is now pulled in via features.h). -Erik | ||||
* | Update to "malloc" so it will work on CPUs not supporting non-aligned words. | Eric Andersen | 2001-02-21 | 1 | -7/+35 |
| | | | | malloc still only works for little-endian CPUs... Patch by Jean-Yves Avenard | ||||
* | Reduce dependancies -- don't use sysconf() internal to libc. | Eric Andersen | 2001-01-15 | 1 | -38/+0 |
| | |||||
* | "I will always compile before I commit." | Eric Andersen | 2001-01-12 | 1 | -2/+2 |
| | | | | | | "I will always compile before I commit." "I will always compile before I commit." -Erik | ||||
* | Patch from James Graves <jgraves@deltamobile.com> to better handle m68k. | Eric Andersen | 2001-01-12 | 1 | -2/+13 |
| | | | | | | Also fixes 2 very important malloc bugs! Anyone using malloc (esp mmu-less) should update and recompile. -Erik | ||||
* | Manuel Novoa III modified malloc.c and avlmacro.h to reduce code size by | Eric Andersen | 2001-01-12 | 1 | -534/+642 |
| | | | | | using functions instead on Inlining (size vas speed tradeoff). I ran the results through indent. Looking pretty good IMHO. | ||||
* | A bunch of updates, part from Manuel Novoa III (such as more long long | Eric Andersen | 2001-01-01 | 1 | -2/+2 |
| | | | | | support), and other updates by me (better cross platform, cross-compiler, etc, support. Now compiles with 2.0.x kernels for armnommu. |