summaryrefslogtreecommitdiffstats
path: root/libc/stdlib
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* Enable WCHAR support for C/POSIX stub locales.Manuel Novoa III2002-07-031-9/+17
| | | | | | Implemented unformatted wide i/o functions. (ungetwc still needs testing) Fix a few bugs in wchar.c. Modifications for bcc/elks support.
* This patch, from Ronald Wahl <rwa@peppercon.com>, fixes theEric Andersen2002-07-011-5/+5
| | | | | spots where I screwed up and forgot to fix realloc to use free_unlocked() instead of free(). Thanks Ronald!
* Rework, reduce the size, add proper lockingEric Andersen2002-06-189-529/+342
| | | | -Erik
* Remove obsolete files.Manuel Novoa III2002-06-182-110/+0
|
* Silly name changeEric Andersen2002-06-181-4/+3
|
* Rework and kill pointless static variableEric Andersen2002-06-181-28/+25
| | | | -Erik
* Commit the new time stuff, even though I haven't made it threadsafe yet.Manuel Novoa III2002-06-171-1/+2
| | | | At least people can play with it. Also, fix a buglet in setenv.c.
* Kill the libc-lock headers, which we do not use and which areEric Andersen2002-06-101-6/+7
| | | | | not correct for uClibc. Fix setenv locking to behave itself. -Erik
* Doh!Eric Andersen2002-06-011-1/+1
|
* Rework setenv, getenv and friends per the latest glibc code, but cleanedEric Andersen2002-05-304-200/+191
| | | | | up for readability. Merge in putenv. Add clearenv as a side effect. -Erik
* Multibyte and wide char conversion functions. Some work still to do, butManuel Novoa III2002-05-232-0/+139
| | | | | they're quite solid now and Erik needs them for the gcc port. Comments at the head of wchar.c.
* Revert Erik's previous patch and fix what I believe he was trying to, whileManuel Novoa III2002-05-121-20/+28
| | | | preserving the space-saving aliases.
* Several bugfixes for problems that showed up on alphaEric Andersen2002-05-121-7/+19
| | | | -Erik
* New locale support (in development). Supports LC_CTYPE, LC_NUMERIC,Manuel Novoa III2002-05-062-14/+172
| | | | | | | | | | | | | | | | | | | | | | LC_TIME, LC_MONETARY, and LC_MESSAGES for the SUSv3 items. Also, nl_langinfo() when real locale support is enabled. New implementation of ctype.h. New implementation of wctype.h. New implementation of most of the string functions (smaller). New implementation of the wcs/wmem functions. These are untested, but they're also just preprocessor-modified versions ot the corresponding str/mem functions. Tweaked qsort and new bsearch. Stuff still pending: stdlib.h and wchar.h mb<->wc functions. I actually have working versions of the stdlib ones, but the reentrant versions from wchar.h require some reworking. Basic replacement and translit support for wc->mb conversions. (groundwork laid). Simple-minded collate support such as was provided by the previous locale implementation. (mostly done -- 8-bit codesets only) Shared mmaping of the locale data and strerror message text.
* Remove function declartions from include/features.h, createEric Andersen2002-04-013-0/+3
| | | | | a separate header file for those, and fixup references. -Erik
* Rework __gen_tempname() to better match glibc, and add mkstemp64(),Eric Andersen2002-03-314-8/+33
| | | | | which is needed for busybox ash when using largefile support. -Erik