Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | two small fixes to free page cache. first, we need two nibbles of random | tedu | 2012-06-20 | 1 | -4/+4 | |
| | | | | | | in order to span the the entire cache. second, on free use the same offset to put things in the cache instead of always starting at zero. ok otto | |||||
* | Support larger-than-page-alignment requests in posix_memalign() by | matthew | 2012-06-18 | 2 | -23/+130 | |
| | | | | | | overallocating and then releasing unneeded memory pages. ok otto | |||||
* | Update STANDARDS section for a few <stdlib.h> functions | guenther | 2012-06-02 | 3 | -9/+29 | |
| | | | | | | Update SYNOPSIS for setkey() to show it's in <stdlib.h> ok jmc@, millert@ | |||||
* | Improve standards conformance: ecvt(), fcvt(), gcvt(), mktemp(), ttyslot(), | guenther | 2012-06-01 | 3 | -8/+11 | |
| | | | | | | | and valloc() are not in the current version, while posix_memalign() mkstemp(), and mkdtemp() are, and setstate()'s argument has lost a bogus 'const'. ok millert@ jmc@ espie@ kettenis@; ports build testing by naddy@ | |||||
* | alloca is NOT machine dependent; it has exactly the same | deraadt | 2012-04-12 | 1 | -7/+3 | |
| | | | | | effective result. its use is NOT discouraged -- it is not common, but when you need it, there is nothing else that will do. | |||||
* | Fix a bug where random() always returns 0 when srandom() is seeded | millert | 2012-03-21 | 1 | -2/+3 | |
| | | | | | with 0. Use 1 and not 0 as the first element of the state array, similar to what glibc does. OK nicm@ | |||||
* | - Test for the retrieved page address not being NULL. This turns free((void*)1) | otto | 2012-02-29 | 1 | -2/+7 | |
| | | | | | | into an bogus pointer error instead of a segfault. - Document that we use the assumption that a non-MAP_FIXED mmap() with hint 0 never returns NULL. | |||||
* | Revert previous diff as it resulted in the wrong return code when | guenther | 2012-02-06 | 1 | -5/+3 | |
| | | | | | | | the last node is deleted. Instead, resolve the Coverity warning by returning (node *)1 when you delete the root node. based an idea from millert@. ok otto@ | |||||
* | Complete the HISTORY of all syscalls that exist since Version 1 AT&T UNIX. | schwarze | 2011-11-17 | 1 | -2/+11 | |
| | | | | | All facts from http://minnie.tuhs.org/cgi-bin/utree.pl, checked by sobrado@. Feedback and ok jmc@ jmc@ (sic, Jason checked and ok'ed this twice). | |||||
* | Make struct chunk_info a variable sized struct, wasting less | otto | 2011-10-06 | 1 | -28/+55 | |
| | | | | | space for meta data by only allocating space actually needed for the bitmap (modulo alignment requirements). ok deraadt@ | |||||
* | some minor tweaks; | jmc | 2011-09-03 | 1 | -2/+2 | |
| | ||||||
* | make -column lists pretty again; | jmc | 2011-09-03 | 1 | -3/+3 | |
| | | | | | | | | | | specifically, rewrite them to permit some markup in the column headers, and use "Ta" instead of literal tabs; mandoc does not currently match groff 100%, but a mandoc fix may be some time off, and we've gone enough releases with poorly formatting column lists. in some cases i have rewritten the lists as -tag, where -column made little sense. | |||||
* | in column lists, enforce the following ordering: | jmc | 2011-08-30 | 1 | -3/+3 | |
| | | | | | | | | | .Bl -column header1 header2 ... <Bl flags> mixing things up confuses mandoc, and adding flags in can screw up the list. this hopefully just makes things a bit safer (and more consistent). (one more bit of work left and all column lists should format how we want) | |||||
* | occured -> occurred; | jmc | 2011-07-24 | 1 | -2/+2 | |
| | ||||||
* | Recent Single Unix will malloc memory if the second argument of realpath() | miod | 2011-07-24 | 2 | -17/+52 | |
| | | | | | | is NULL, and third-party software is starting to rely upon this. Adapted from FreeBSD via Jona Joachim (jaj ; hcl-club , .lu), with minor tweaks from nicm@ and yours truly. | |||||
* | Show (in the example) that < and > can be used multiple times; ok jmc@ | otto | 2011-07-22 | 1 | -4/+5 | |
| | | | | jasper@ | |||||
* | - add a MALLOC_OPTIONS section header. the content is already there, but having | jasper | 2011-07-21 | 1 | -3/+3 | |
| | | | | | | a section will help people looking for just the MALLOC_OPTIONS. ok otto@ jmc@ | |||||
* | on malloc flag S, set cache size to 0; will catch even more | otto | 2011-07-12 | 1 | -2/+6 | |
| | | | | use-after-free bugs; ok krw@ dlg@ pirofti@ | |||||
* | no more math(3); | jmc | 2011-07-07 | 9 | -32/+23 | |
| | ||||||
* | as man page states, lower case undoes upper case. add support for little s, | tedu | 2011-06-20 | 1 | -1/+5 | |
| | | | | | no security, for consistency. use of this option is discouraged. :) ok deraadt guenther millert | |||||
* | save errno dance in wrterror() and malloc_dump(); prompted by and ok deraadt@ | otto | 2011-05-20 | 1 | -2/+6 | |
| | ||||||
* | introduce symbolic constant for initial number of regions | otto | 2011-05-18 | 1 | -2/+3 | |
| | ||||||
* | zap regions_bits and rework MALLOC_MAXSHIFT a bit; ok djm@ | otto | 2011-05-18 | 1 | -14/+8 | |
| | ||||||
* | Avoid fp computations for stats, this make calling malloc_dump() safe in more | otto | 2011-05-12 | 1 | -10/+7 | |
| | | | | cases. | |||||
* | fix comment, the bitmap is an array of u_short now | otto | 2011-05-12 | 1 | -2/+2 | |
| | ||||||
* | Introduce leak detection code for MALLOC_STATS | otto | 2011-05-12 | 1 | -25/+165 | |
| | ||||||
* | Move MALLOC_STATS code to bottom of file, so the real stuff is more at the top. | otto | 2011-05-08 | 1 | -137/+141 | |
| | ||||||
* | Up until now, malloc scanned the bits of the chunk bitmap from | otto | 2011-05-05 | 1 | -32/+24 | |
| | | | | | | | | | | | | | | | | | | position zero, skipping a random number of free slots and then picking the next free one. This slowed things down, especially if the number of full slots increases. This changes the scannning to start at a random position in the bitmap and then taking the first available free slot, wrapping if the end of the bitmap is reached. Of course we'll still scan more if the bitmap becomes more full, but the extra iterations skipping free slots and then some full slots are avoided. The random number is derived from a global, which is incremented by a few random bits every time a chunk is needed (with a small optimization if only one free slot is left). Thanks to the testers! | |||||
* | Now that we use an array of u_short for the chunk bitmap change a few | otto | 2011-04-30 | 1 | -5/+5 | |
| | | | | 1UL to 1U. | |||||
* | More efficient scanning for free chunks while not losing any randomization; | otto | 2011-04-30 | 1 | -21/+25 | |
| | | | | thanks to all testers. | |||||
* | Tweak the description of the optional parts around =. Found this in my | otto | 2011-04-27 | 1 | -5/+7 | |
| | | | | tree, no idea where it came from; ok millert@ jmc@ | |||||
* | tweak for clarity, ok millert@, jmc@ | espie | 2011-03-21 | 1 | -4/+4 | |
| | ||||||
* | wrong type for variable; spotted by christian.siebert@cs.tu-chemnitz.de | deraadt | 2011-03-06 | 1 | -3/+3 | |
| | | | | ok guenther | |||||
* | Fix PR 6267: recheck POSIXLY_CORRECT each time getopt_long() starts a new | guenther | 2011-03-05 | 3 | -44/+16 | |
| | | | | | | | | argv and don't suppress the handling of leading '-' in optstring when POSIXLY_CORRECT is set. Based on patch from Eric Blake. ok and manpage update from millert@, manpage ok jmc@ | |||||
* | Fix __cxa_finalize() so that calling __cxa_finalize(NULL) properly | matthew | 2011-03-02 | 1 | -2/+2 | |
| | | | | | | invokes handlers registered with __cxa_atexit(). "seems right" deraadt@ | |||||
* | Correctly escape a literal colon in an enclosure; | schwarze | 2011-01-24 | 1 | -3/+3 | |
| | | | | the \: roff escape is an optional line break. | |||||
* | superceded -> superseded; | jmc | 2011-01-14 | 1 | -3/+3 | |
| | ||||||
* | avoid pointer arithmetic on void * | dhill | 2010-12-16 | 1 | -5/+5 | |
| | | | | | | tested for a while by me. ok otto@ | |||||
* | involes -> involves; from Carlos Alberto Pereira Gomes | jmc | 2010-11-30 | 1 | -1/+1 | |
| | ||||||
* | print the pointer value that caused the error (if available); ok | otto | 2010-10-21 | 1 | -47/+54 | |
| | | | | deraadt@ nicm@ (on an earlier version) | |||||
* | Make gcvt() better match printf("%g") behavior, it now passes regress. | millert | 2010-09-25 | 1 | -11/+23 | |
| | | | | OK deraadt@ | |||||
* | more wacky macro fixing; | jmc | 2010-09-19 | 1 | -37/+37 | |
| | ||||||
* | Check for duplicate variables in the environment when setting a value | millert | 2010-08-23 | 2 | -11/+24 | |
| | | | | via setenv() or putenv(). OK miod@ | |||||
* | Sync hcreate(3) with NetBSD, adding some caveats. | ray | 2010-07-28 | 1 | -12/+67 | |
| | | | | OK jmc | |||||
* | getopt_long.c replaced getopt.c 6+ years ago; we can retire | blambert | 2010-07-22 | 1 | -7/+1 | |
| | | | | | | the REPLACE_GETOPT macro, at long last ok millert@ | |||||
* | Document new unsetenv() error returns. | naddy | 2010-07-06 | 1 | -2/+8 | |
| | | | | From Nicolas Legrand <nlegrand@ethelred.fr>; ok jmc@ | |||||
* | Make unsetenv(NULL) and unsetenv("") give EINVAL, per POSIX. ok deraadt@ | naddy | 2010-06-29 | 1 | -1/+5 | |
| | ||||||
* | oops - forgot to check for trailing whitespace; | jmc | 2010-05-26 | 1 | -2/+2 | |
| | ||||||
* | reword the 'D' dump bit to make it clear that the malloc.out file needs | thib | 2010-05-26 | 1 | -4/+5 | |
| | | | | | | | to exist before exit for malloc to dump stats in it. tweaks from jmc@ ok otto@,jmc@ | |||||
* | tweak previous; | jmc | 2010-05-19 | 1 | -2/+2 | |
| |