summaryrefslogtreecommitdiff
path: root/libc/stdlib
AgeCommit message (Collapse)Author
2002-08-12Geez I'm an idiot some times. I shouldn't code when I'm exhausted.Eric Andersen
I _totally_ screwed up the locking on exit and atexit such that it didn't do any good at all. -Erik
2002-08-09Add missing thread-safe locking.Eric Andersen
-Erik
2002-08-08Fix lockingEric Andersen
2002-08-08Cleanup some silly warningsEric Andersen
2002-08-07Changed my mind. Keep this separate.Eric Andersen
-Erik
2002-08-07Rewrite getenvEric Andersen
2002-08-07Per suggestion from Miles Bader, move calloc.c to libc/stdlib.Eric Andersen
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
2002-08-06Unify calloc (its the same thing regardless of the underlyingEric Andersen
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
2002-08-01Use MALLOC_REALLOC_MIN_FREE_SIZE.Miles Bader
2002-08-01(MALLOC_REALLOC_MIN_FREE_SIZE): New macro.Miles Bader
Enable debugging if MALLOC_DEBUGGING is defined.
2002-08-01(HEAP_MIN_SIZE): New macro.Miles Bader
(HEAP_MIN_FREE_AREA_SIZE): Increase size. Enable debugging if HEAP_DEBUGGING is defined.
2002-07-31In the allocate-and-copy case, don't include the malloc header in ourMiles Bader
size calculations.
2002-07-31Update debugging printfs.Miles Bader
2002-07-31Per discussion on the mailing list, simply vfork -> fork mapping to only applyEric Andersen
iff we do not have vfork available, which is simpler and more reasonable. -Erik
2002-07-31Account for MALLOC_HEADER_SIZE when calculating new size.Miles Bader
2002-07-31Use MALLOC_HEADER_SIZE.Miles Bader
2002-07-31(MALLOC_HEADER_SIZE): New macro.Miles Bader
(MALLOC_BASE, MALLOC_ADDR): Use it.
2002-07-30Make sure NEW_SIZE is a multiple of HEAP_GRANULARITY.Miles Bader
Calculate amount freed when shrinking correctly.
2002-07-30Update the size of grown/shrunk allocations.Miles Bader
MALLOC_SET_SIZE now takes the user-address rather than the base-address.
2002-07-30MALLOC_SET_SIZE now takes the user-address rather than the base-address.Miles Bader
2002-07-30Define MALLOC_SET_SIZE to take the user-address rather than the base-address.Miles Bader
2002-07-30Implement shrinking.Miles Bader
Fix bug when growing an allocation. Use new malloc header macros.
2002-07-30Use new malloc header macros.Miles Bader
2002-07-30Add macros to abstract the malloc header format a bit.Miles Bader
2002-07-25Size tweaks.Miles Bader
2002-07-25Miscellaneous tidying-up.Miles Bader
2002-07-25Redo the locking, so that it may actually work. Now locking is done atMiles Bader
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.
2002-07-24Factor out some common code sequences into inline functions.Miles Bader
2002-07-24Misc small cleanups.Miles Bader
2002-07-24Remove, since it's entirely incorrectMiles Bader
2002-07-23* Automatically try to unmap heap free-areas when they get very big.Miles Bader
* 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.
2002-07-19Doc fix.Miles Bader
2002-07-19Rename mutex stuff to use heap-specific names.Miles Bader
Doc fix.
2002-07-18Miles Bader implemented a new mmap based malloc which is muchEric Andersen
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!
2002-07-16We don't need the debug versionsEric Andersen
2002-07-16__morecore need not be a function pointerEric Andersen
2002-07-16Disable debug stuff by defaultEric Andersen
2002-07-16Odd. Got a copy of junk in here.Eric Andersen
2002-07-10Patch from Ronald Wahl <rwa@peppercon.com> to fix a memory leakEric Andersen
2002-07-03Enable WCHAR support for C/POSIX stub locales.Manuel Novoa III
Implemented unformatted wide i/o functions. (ungetwc still needs testing) Fix a few bugs in wchar.c. Modifications for bcc/elks support.
2002-07-01This patch, from Ronald Wahl <rwa@peppercon.com>, fixes theEric Andersen
spots where I screwed up and forgot to fix realloc to use free_unlocked() instead of free(). Thanks Ronald!
2002-06-18Rework, reduce the size, add proper lockingEric Andersen
-Erik
2002-06-18Remove obsolete files.Manuel Novoa III
2002-06-18Silly name changeEric Andersen
2002-06-18Rework and kill pointless static variableEric Andersen
-Erik
2002-06-17Commit the new time stuff, even though I haven't made it threadsafe yet.Manuel Novoa III
At least people can play with it. Also, fix a buglet in setenv.c.
2002-06-10Kill the libc-lock headers, which we do not use and which areEric Andersen
not correct for uClibc. Fix setenv locking to behave itself. -Erik
2002-06-01Doh!Eric Andersen
2002-05-30Rework setenv, getenv and friends per the latest glibc code, but cleanedEric Andersen
up for readability. Merge in putenv. Add clearenv as a side effect. -Erik
2002-05-23Multibyte and wide char conversion functions. Some work still to do, butManuel Novoa III
they're quite solid now and Erik needs them for the gcc port. Comments at the head of wchar.c.