summaryrefslogtreecommitdiffstats
path: root/libc/stdlib
Commit message (Collapse)AuthorAgeFilesLines
...
* (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.
* Patch from Jarkko to fix drand48 to not use long long whenEric Andersen2002-08-152-0/+46
| | | | long long support is disabled in the uClibc Config.
* 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.
* Doh! missed a spot.Eric Andersen2002-08-121-0/+2
| | | | -Erik
* Revert commit by davidm to printf.c that initialized conv_numManuel Novoa III2002-08-121-15/+15
| | | | | | | | | needlessly. To do so increases the generated code size with bcc. Eliminate duplicate define warnings in wstring.c. Fix potentially broken preprocessor comparisons. The preprocessor converts integers to maximal signed type, so inequality comparisons involving UINTMAX_MAX, ULLONG_MAX, and (if no long long) ULONG_MAX were potentially broken.
* Geez I'm an idiot some times. I shouldn't code when I'm exhausted.Eric Andersen2002-08-121-1/+2
| | | | | | I _totally_ screwed up the locking on exit and atexit such that it didn't do any good at all. -Erik
* Add missing thread-safe locking.0_9_13Eric Andersen2002-08-091-0/+27
| | | | -Erik
* Fix lockingEric Andersen2002-08-081-0/+19
|
* Cleanup some silly warningsEric Andersen2002-08-085-5/+11
|
* Changed my mind. Keep this separate.Eric Andersen2002-08-071-0/+41
| | | | -Erik
* Rewrite getenvEric Andersen2002-08-071-25/+0
|
* Per suggestion from Miles Bader, move calloc.c to libc/stdlib.Eric Andersen2002-08-074-11/+15
| | | | | | 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-064-59/+35
| | | | | | | | 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
|
* Per discussion on the mailing list, simply vfork -> fork mapping to only applyEric Andersen2002-07-312-2/+2
| | | | | iff we do not have vfork available, which is simpler and more reasonable. -Erik
* Account for MALLOC_HEADER_SIZE when calculating new size.Miles Bader2002-07-311-3/+4
|
* Use MALLOC_HEADER_SIZE.Miles Bader2002-07-311-1/+1
|
* (MALLOC_HEADER_SIZE): New macro.Miles Bader2002-07-311-2/+6
| | | | (MALLOC_BASE, MALLOC_ADDR): Use it.
* Make sure NEW_SIZE is a multiple of HEAP_GRANULARITY.Miles Bader2002-07-301-2/+2
| | | | Calculate amount freed when shrinking correctly.
* Update the size of grown/shrunk allocations.Miles Bader2002-07-301-16/+16
| | | | MALLOC_SET_SIZE now takes the user-address rather than the base-address.
* MALLOC_SET_SIZE now takes the user-address rather than the base-address.Miles Bader2002-07-301-2/+1
|
* Define MALLOC_SET_SIZE to take the user-address rather than the base-address.Miles Bader2002-07-301-2/+2
|
* Implement shrinking.Miles Bader2002-07-301-6/+19
| | | | | Fix bug when growing an allocation. Use new malloc header macros.
* Use new malloc header macros.Miles Bader2002-07-302-5/+6
|
* Add macros to abstract the malloc header format a bit.Miles Bader2002-07-301-1/+22
|
* Size tweaks.Miles Bader2002-07-253-15/+17
|
* Miscellaneous tidying-up.Miles Bader2002-07-252-13/+10
|
* Redo the locking, so that it may actually work. Now locking is done atMiles Bader2002-07-258-130/+186
| | | | | | | | | 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.
* Factor out some common code sequences into inline functions.Miles Bader2002-07-242-53/+74
|
* Misc small cleanups.Miles Bader2002-07-243-4/+6
|
* Remove, since it's entirely incorrectMiles Bader2002-07-241-33/+0
|
* * Automatically try to unmap heap free-areas when they get very big.Miles Bader2002-07-238-190/+234
| | | | | | | | * 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 Bader2002-07-195-5/+5
|
* Rename mutex stuff to use heap-specific names.Miles Bader2002-07-195-24/+26
| | | | Doc fix.
* Miles Bader implemented a new mmap based malloc which is muchEric Andersen2002-07-1816-1392/+740
| | | | | | | 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!
* We don't need the debug versionsEric Andersen2002-07-161-2/+2
|
* __morecore need not be a function pointerEric Andersen2002-07-161-9/+8
|
* Disable debug stuff by defaultEric Andersen2002-07-161-1/+1
|
* Odd. Got a copy of junk in here.Eric Andersen2002-07-161-9/+0
|
* Patch from Ronald Wahl <rwa@peppercon.com> to fix a memory leakEric Andersen2002-07-101-1/+1
|