summaryrefslogtreecommitdiffstats
path: root/libc/stdlib/malloc
Commit message (Collapse)AuthorAgeFilesLines
* malloc: handle size overflows in realloc()Mike Frysinger2009-10-161-0/+3
| | | | | | | | | | The malloc() code checks the incoming size to make sure the header adjustment doesn't cause overflow in the size storage. Add the same check to realloc() to catch stupid stuff like realloc(..., -1). Reported-by: James Coleman <james.coleman@ubicom.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* trim Experimentally off and uncommented hiddenAustin Foxley2009-09-186-13/+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: Austin Foxley <austinf@cetoncorp.com>
* support building out-of-treeBernhard Reutner-Fischer2009-08-191-0/+2
| | | | | | | Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Synch with trunk @ 24165Carmelo Amoroso2008-11-274-10/+10
| | | | | Step 17: libc_hidden_proto removal (almost all). and other minor changes (inline keyword, extra character)
* Synch with trunk @ 24087Carmelo Amoroso2008-11-181-1/+1
| | | | Step 10: libc_hidden_removal
* Synch with trunk @ 24075.Carmelo Amoroso2008-11-1710-90/+102
| | | | Step 7: libc/stdlib and malloc
* Synch with trunk @ 24075.Carmelo Amoroso2008-11-171-4/+4
| | | | | Step 5 Various Makefile.in
* Synch with trunk at rev 22997.Carmelo Amoroso2008-07-314-8/+8
| | | | | | | Basically trailing whitespaces removal, fix non standard keywords asm -> __asm__ inline -> __inline__ and some minor changes on trunk. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* BIG BIG commit: all left files merged from trunk [rev 22714]. Currenntly ↵Carmelo Amoroso2008-07-0911-17/+26
| | | | NPTL sh4 port build and work fine. All committed to allow Khem Ray working on a working branch to integrate the ARM nptl port. MIPS nptl port not tested but should still building and working fine. There are some other part non yet merged with trunk (misc/internals and some headers file that need some more work). Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Fix Makefile.in and synch them with trunk. Signed-off-by: Carmelo Amoroso ↵Carmelo Amoroso2007-11-203-7/+14
| | | | <carmelo.amoroso@st.com>
* Merge from trunk."Steven J. Hill"2006-08-222-3/+2
|
* Merge from trunk. Going pretty good so far. Kind of. Okay, not really."Steven J. Hill"2006-02-259-35/+40
|
* Big fricking merge from trunk."Steven J. Hill"2006-01-076-5/+9
|
* Merge from trunk."Steven J. Hill"2005-12-103-0/+7
|
* Big merge from trunk. Stop the madness!"Steven J. Hill"2005-12-063-9/+5
|
* Merge from trunk."Steven J. Hill"2005-12-023-55/+10
|
* Massive merge from trunk."Steven J. Hill"2005-11-171-3/+1
|
* Copy from trunk."Steven J. Hill"2005-10-301-0/+42
|
* merge parallel build supportMike Frysinger2005-01-251-4/+4
|
* The variable used to store pagesize is not the same as theEric Andersen2004-08-161-1/+2
| | | | | _dl_pagesize variable in ldso, so avoid aliasing. -Erik
* Fixup PAGE_SIZE problemsEric Andersen2004-08-131-3/+2
| | | | -Erik
* Use MAP_PRIVATE whenever __ARCH_HAS_MMU__ is set.Eric Andersen2004-07-151-1/+6
| | | | Only use MAP_SHARED when mmu-less.
* s/UCLIBC_HAS_MMU/ARCH_HAS_MMU/gEric Andersen2004-01-161-1/+1
|
* Rework malloc. The new default implementation is based on dlmalloc from DougEric Andersen2003-12-302-2/+42
| | | | | | | Lea. It is about 2x faster than the old malloc-930716, and behave itself much better -- it will properly release memory back to the system, and it uses a combination of brk() for small allocations and mmap() for larger allocations. -Erik
* Fix a long-standing bug with pthreads. A couple of linuxthreads filesManuel Novoa III2003-12-272-4/+4
| | | | | | | | | | | | | | | | were including libc-lock.h which had a bunch of weak pragmas. Also, uClibc supplied a number of no-op weak thread functions even though many weren't needed. This combined result was that sometimes the functional versions of thread functions in pthread would not override the weaks in libc. While fixing this, I also prepended double-underscore to all necessary weak thread funcs in uClibc, and removed all unused weaks. I did a test build, but haven't tested this since these changes are a backport from my working tree. I did test the changes there and no longer need to explicitly add -lpthread in the perl build for perl to pass its thread self tests.
* Peter Kjellerstedt writes:Eric Andersen2003-10-181-1/+1
| | | | | | | rm.patch: * Define $(RM) as rm -f in Rules.mak and test/Rules.mak (this is the same definition as gmake uses by default). * Change all occurrences of rm and rm -f into $(RM).
* Code formatting cleanup.Miles Bader2003-10-161-5/+6
|
* Don't set errno if for zero SIZE returns.Miles Bader2003-10-161-11/+14
| | | | Code formatting cleanup.
* More fiddling with static free-areas: make sure both their size _and_Miles Bader2003-09-221-5/+5
| | | | their alignment are correct.
* Make sure we don't allocate too little space for static free-areasMiles Bader2003-09-191-1/+3
| | | | because of our fiddling with alignment (because doing so is VERY BAD).
* Add dependencies on header files.Miles Bader2003-09-191-2/+5
|
* Make sure static heaps are aligned correctly.Miles Bader2003-09-171-9/+11
|
* 'extern inline' doesn't work... Use 'static inline'Eric Andersen2003-09-061-5/+5
|
* add missing prototypeEric Andersen2003-09-061-0/+2
|
* Fix errno values. Fix MALLOC_GLIBC_COMPAT handling in malloc/malloc.c,Eric Andersen2003-09-062-12/+24
| | | | | 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 theyEric Andersen2003-08-081-0/+5
| | | | want glibc style malloc(0) behavior
* (free_to_heap): Unlock the heap before returning in theMiles Bader2003-04-021-2/+5
| | | | __UCLIBC_UCLINUX_BROKEN_MUNMAP__ case. Fix from YYang1@Winbond.com.tw.
* Update malloc behavior on malloc(0) to be consistant withEric Andersen2003-01-231-2/+5
| | | | malloc-930716 behavior, i.e. return a NULL.
* Debugging tweaks.Miles Bader2002-11-212-8/+12
|
* Improve malloc debugging support.Miles Bader2002-11-217-46/+186
|
* Don't infinitely recurse when trying to grow __malloc_mmb_heap.Miles Bader2002-10-181-18/+19
|
* Fix malloc so it compiles and works when using pthreadsEric Andersen2002-10-172-5/+5
| | | | -Erik
* Use __heap_[un]lock instead of __malloc_[un]lock.Miles Bader2002-10-151-4/+4
|
* Get rid of old malloc lock stuff.Miles Bader2002-10-151-8/+0
|
* Fix locking to not deadlock when __UCLIBC_UCLINUX_BROKEN_MUNMAP__ is defined.Miles Bader2002-10-152-34/+32
|
* * Add support for uClinux's broken munmap, contingent onMiles Bader2002-10-094-29/+264
| | | | | | | | | __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.
* (__heap_check_failure): New function.Miles Bader2002-09-131-16/+67
| | | | (__heap_check): Add more checks. Use `__heap_check_failure'.
* (realloc): Record the correct size in the malloc header in the caseMiles Bader2002-09-091-1/+1
| | | | | where we extended the existing allocation, and got back more than we asked for from the heap.
* Initial checkin.Miles Bader2002-09-061-0/+86
|
* Update debugging hooks.Miles Bader2002-09-063-30/+20
|