summaryrefslogtreecommitdiffstats
path: root/libc/stdlib/malloc
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* (free):Miles Bader2002-09-041-5/+5
| | | | | Update debug statement. Update to use __heap_delete and __heap_is_empty.
* (__heap_delete): Renamed from `__heap_unlink_free_area'.Miles Bader2002-09-041-3/+6
| | | | | (__heap_free_area_alloc): Use __heap_delete. (__heap_is_empty): New macro.
* Doc fix.Miles Bader2002-08-301-1/+1
|
* (__heap_free): Tighten up the inner loop, and make the code more readable.Miles Bader2002-08-301-29/+24
|
* Use `likely' & `unlikely' instead of the `__malloc_'-prefixed versions.Miles Bader2002-08-302-5/+5
|
* (likely, unlikely): New macros.Miles Bader2002-08-301-0/+12
|
* (likely, unlikely): New macros.Miles Bader2002-08-301-6/+8
| | | | (__malloc_likely, __malloc_unlikely): Macros removed.
* (CSRC): Make contents source files, not object files.Miles Bader2002-08-191-2/+2
|
* (CSRC): Add `memalign.c'.Miles Bader2002-08-191-2/+2
|
* Initial checkin.Miles Bader2002-08-191-0/+94
|
* (realloc): Follow new arg conventions of MALLOC_SET_SIZE.Miles Bader2002-08-191-2/+2
|
* (malloc): Use MALLOC_SETUP.Miles Bader2002-08-191-3/+2
|
* (MALLOC_SETUP): New macro.Miles Bader2002-08-191-5/+6
| | | | | (MALLOC_SET_SIZE): Take the base-address of the block, not the user-address. (MALLOC_ADDR): Macro removed.
* Use __malloc_unlikely instead of `likely'.Miles Bader2002-08-141-1/+4
|
* Add flow-control hints with __malloc_likely and __malloc_unlikely.Miles Bader2002-08-141-5/+7
|
* (__malloc_likely, __malloc_unlikely): New macros.Miles Bader2002-08-141-0/+10
|
* Handle zero NEW_SIZE case.Miles Bader2002-08-141-45/+54
|
* Use `return' for null pointers, to avoid a giant block holding the restMiles Bader2002-08-131-95/+95
| | | | of the function.
* Per suggestion from Miles Bader, move calloc.c to libc/stdlib.Eric Andersen2002-08-071-1/+2
| | | | | | Also, Manuel notices that I forgot to check for when nmemb=0, which would result in a segfault, so fix that case as well. -Erik
* Unify calloc (its the same thing regardless of the underlyingEric Andersen2002-08-062-34/+2
| | | | | | | | malloc implementation). Fix problem reported to bugtraq about problems with integer overflow that can occur during the computation of the memory region size by calloc (and similar functions) which could result in a subsequent buffer overflow. -Erik
* Use MALLOC_REALLOC_MIN_FREE_SIZE.Miles Bader2002-08-011-1/+1
|
* (MALLOC_REALLOC_MIN_FREE_SIZE): New macro.Miles Bader2002-08-011-2/+8
| | | | Enable debugging if MALLOC_DEBUGGING is defined.
* (HEAP_MIN_SIZE): New macro.Miles Bader2002-08-011-6/+15
| | | | | (HEAP_MIN_FREE_AREA_SIZE): Increase size. Enable debugging if HEAP_DEBUGGING is defined.
* In the allocate-and-copy case, don't include the malloc header in ourMiles Bader2002-07-311-2/+2
| | | | size calculations.
* Update debugging printfs.Miles Bader2002-07-313-4/+4
|