summaryrefslogtreecommitdiffstats
path: root/libc/stdlib/malloc-simple/alloc.c
Commit message (Collapse)AuthorAgeFilesLines
* malloc-simple: Make calloc() return zeroed memorySteven J. Magnani2010-07-271-5/+4
| | | | | | | | | | The 0.9.31 release included a change to malloc-simple to request uninitialized memory from noMMU kernels. Unfortunately, the corresponding calloc() code assumed that memory returned by malloc() was already zeroed, which leads to all kinds of nastiness. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nommu: use MAP_UNINITIALIZE for mallocsMike Frysinger2009-11-231-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 hiddenBernhard Reutner-Fischer2009-09-181-4/+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>
* Last portion of libc_hidden_proto removal.Denis Vlasenko2008-11-201-1/+1
| | | | | Appears to build fine (several .configs tried)
* next portion of libc_hidden_proto removalDenis Vlasenko2008-11-201-1/+1
|
* - pull in prototype for memalign()Bernhard Reutner-Fischer2008-10-271-0/+1
|
* Fix bug 4994 hangs on read(). I have tested the patch extensibly on ARM/LT.old.Khem Raj2008-10-111-1/+1
| | | | | Thank you Chase Douglas for reporting it and for the patch.
* add missing includes of unistd.h for smallint usageDenis Vlasenko2008-06-011-1/+0
| | | | | remove a few duplicate includes of unistd.h
* Moving libc_hidden_proto's into #ifdef UCLIBC_INTERNAL blockDenis Vlasenko2008-05-191-1/+1
| | | | | | | | | in string.h and strings.h. This caught unguarded string ops in libc/inet/ethers.c __ether_line_w() function. I will wait for fallout reports for a week or so, then continue converting more libc_hidden_proto's.
* POSIX says you can use realloc() to shrink buffers ... make sure we dont ↵Mike Frysinger2007-04-111-1/+2
| | | | trigger a buffer overflow in that case
* POSIX requires that errno be set whenever 0 is returned by malloc()Mike Frysinger2007-04-021-1/+2
|
* Major cleanup of internal mutex locking. Be more consistant in how we doEric Andersen2006-12-071-14/+13
| | | | | | | things, and avoid potential deadlocks caused when a thread holding a uClibc internal lock get canceled and terminates without releasing the lock. This change also provides a single place, bits/uClibc_mutex.h, for thread libraries to modify to change all instances of internal locking.
* tweak the idea between having a MMU and actually using itMike Frysinger2006-02-181-1/+1
|
* Update some copyrightsPeter S. Mazinger2006-02-131-2/+4
|
* Enable _GNU_SOURCE build wide, trying to get consistent interfaces, else IMA ↵Peter S. Mazinger2006-01-221-1/+0
| | | | is a useless attempt
* hidden_def/hidden_proto: convert all users (I hope) termios split, add some ↵Peter S. Mazinger2006-01-141-5/+6
| | | | missing headers, other jump relocs removed
* mmap/mremap/socket/rewind gonePeter S. Mazinger2005-12-081-0/+1
|
* macro out the thread funcs in libc if threading is disabledMike Frysinger2005-12-061-6/+3
|
* More hiding, 300 leftPeter S. Mazinger2005-12-041-0/+2
|
* Hide mostly used functionsPeter S. Mazinger2005-12-011-2/+2
|
* update syntaxMike Frysinger2005-07-071-87/+83
|
* Yoshinori Sato writes:Mike Frysinger2005-07-071-22/+7
| | | | | | Dont forgive that length of munmap is "0" in current nommu. This purpose cannot free memory area really. It is a patch to work out a solution.
* Use MAP_PRIVATE whenever __ARCH_HAS_MMU__ is set.Eric Andersen2004-07-151-2/+2
| | | | Only use MAP_SHARED when mmu-less.
* s/UCLIBC_HAS_MMU/ARCH_HAS_MMU/gEric Andersen2004-01-161-4/+4
|
* Include missing errno.h header (as noted by Alan Hourihane).Eric Andersen2004-01-141-3/+5
| | | | | Fix uninitialized pthread mutex used to lock the list of aligned memory blocks.
* Rework malloc. The new default implementation is based on dlmalloc from DougEric Andersen2003-12-301-7/+22
| | | | | | | 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
* Update and restore malloc-simple. Slow as molasses, but triviallyEric Andersen2003-12-301-0/+189
| | | | | simple and releases memory immediately when asked to do so. -Erik
* Miles Bader implemented a new mmap based malloc which is muchEric Andersen2002-07-181-141/+0
| | | | | | | 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!
* Patch from Ronald Wahl <rwa@peppercon.com> to fix a memory leakEric Andersen2002-07-101-1/+1
|
* Fix simple malloc to work on systems with an MMUDavid McCullough2002-01-171-9/+31
|
* Fix a couple of warningsDavid McCullough2001-08-091-2/+2
|
* Patch from Tom Walsh <tom@cyberiansoftware.com> to fix a thinkoEric Andersen2001-04-271-1/+2
| | | | on my patch.
* Be more strict with the malloc implementation. Return NULLEric Andersen2001-04-251-5/+10
| | | | | when folks do a malloc(0) using malloc-simple. -Erik
* Fix up breakage resulting from flipping the sense of some defines. Change fromEric Andersen2001-03-191-3/+4
| | | | | | | | 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
* Use MAP_FAILED.Eric Andersen2001-02-131-1/+1
|
* Patch from James Graves <jgraves@deltamobile.com> to better handle m68k.Eric Andersen2001-01-121-2/+4
| | | | | | Also fixes 2 very important malloc bugs! Anyone using malloc (esp mmu-less) should update and recompile. -Erik
* Finish reorganizing things. At least I think I've finished.Eric Andersen2000-10-111-2/+6
|
* Bug ugly formatting updateEric Andersen2000-10-091-0/+106