summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
AgeCommit message (Collapse)Author
2014-09-08obvious cases of missing .An;Ingo Schwarze
found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
2014-08-18a small tweak to improve malloc in multithreaded programs. we don't needTed Unangst
to hold the malloc lock across mmap syscalls in all cases. dropping it allows another thread to access the existing chunk cache if necessary. could be improved to be a bit more aggressive, but i've been testing this simple diff for some time now with good results.
2014-08-15XPG requires insque() and remque() to work with linear lists and not justPhilip Guenther
circular lists. Amazingly, they managed to extend the requirements to no longer match the behavior of the VAX instructions they were modeled after, so the trivial VAX ASM versions have to go. Nice job breaking it, X/Open! Based on a diff from enh (at) google.com ok miod@
2014-08-10Only need <stdint.h> and not all of <inttypes.h> herePhilip Guenther
2014-07-18Remove "const" from the lsearch(3) manual's synopsis too.Matthew Dempsky
Reminded by Rafael Neves
2014-07-18zap trailing whitespace;Jason McIntyre
2014-07-18Change lsearch()'s "base" argument to require a non-const pointer toMatthew Dempsky
align with POSIX and other systems. Pointed out by Elliott Hughes on tech ok deraadt
2014-07-17it is 2014, and we still need to encourage people away from srand()Theo de Raadt
and random(). Sigh.
2014-07-13oops, i deleted the wrong wordTed Unangst
2014-07-13remove a lie spotted by guentherTed Unangst
2014-07-13once srandomdev() is called, switch to using arc4random() but mask off theTed Unangst
high bit as required by posix. wouldn't want to break any standards. idea and ok deraadt
2014-07-11Add locking for __cxa_finalize() as it modifies the page permissions of theMark Kettenis
__atexit tables and touches global variables. From Srinavasa Nagaraju through Android/Elliott Hughes. ok tedu@, guenther@
2014-07-11better document perils of setuid getenv and xr with issetugidTed Unangst
ok deraadt
2014-07-10as noted by google/android via kettenis, atexit handlers can install newTed Unangst
handlers. if this happens, restart the loop. ok kettenis matthew millert miod
2014-07-09reduce obvious dependency on global g_pool by moving to local aliasesTed Unangst
ok otto
2014-06-27extra evil spaces snuck in over the last whileTheo de Raadt
2014-06-27Move to a smaller rbytes buffer and skip a random part. Not toOtto Moerbeek
improve the random stream itself (it doesn't), but to introduce noise in the arc4random calling pattern. Thanks to matthew@ who pointed out bias in a previous diff, ok deraadt@ matthew@
2014-06-18Always call atexit handlers as if they were registered with __cxa_atexit.Mark Kettenis
The extra argument doesn't hurt genuine atexit handlers and this fixes a bug where we didn't provide the argument (effectively passing garbage) for functions registered with __cxa_atexit in the main executable. Pointed out by Dmitriy Ivanov <dimitry@google.com> and Elliott Hughes <enh@google.com>. ok matthew@
2014-06-15oops, typo. James Hartley is fast at trying -currentTheo de Raadt
2014-06-15In srandomdev(), use arc4random_buf() instead of from the kernel.Theo de Raadt
discussion with matthew
2014-06-13use getentropy; from matthewTheo de Raadt
2014-06-12Disable the "switch to insertion sort" optimization to avoid quadraticTodd C. Miller
behavior for certain inputs. From NetBSD. OK tedu@
2014-06-02move random bytes buffer to be part of mmaped pages; ok tedu@Otto Moerbeek
2014-05-26move all stats collecting under MALLOC_STATS; ok krw@Otto Moerbeek
2014-05-21fix MALLOC_STATS (not compiled in by default); ok tedu@Otto Moerbeek
2014-05-18factor out a bit of the chunk index code and use it to make sure that aTed Unangst
freed chunk is actually freeable immediately. catch more errors. hints/ok otto
2014-05-14stop flushing streams in abort(). it's hackish and unsafe, and no longerTed Unangst
required. try to document this fact and some of the history. with feedback from deraadt guenther millert
2014-05-12change to having four freelists per size, to reduce another source ofTed Unangst
deterministic behavior. four selected because it's more than three, less than five. i.e., no particular reason.
2014-05-10fix MALLOC_STATS code that was broken in rev 1.159, not compiled in by defaultOtto Moerbeek
2014-05-08move reallocarray() to a seperate file so that -portable applicationsTheo de Raadt
can avoid reinventing the wheel ok guenther schwarze
2014-05-07comment style fixAlexander Hall
ok crickets@
2014-05-01tweak previous; ok sthenJason McIntyre
2014-05-01nibbles aren't enough random, use bytes. does a better job of pickingTed Unangst
a free chunk at random and may allow to increase delayed chunk array. ok otto
2014-04-30first cut at documenting the change to malloc doing a partial 'junk' byStuart Henderson
default and the new 'j' option to disable this; ok jmc@
2014-04-23remove Z option and default to something halfway to J.Ted Unangst
we always junk small chunks now, and the first part of pages, but only after free. J still does the old thing. j disables everything. Consider experimental as we evaluate performance in the real world. ok otto
2014-04-23explain a bit more what's going on for stupid me.Marc Espie
okay otto@
2014-04-23Better, cleaner hash function that computes the same on be and le archs.Otto Moerbeek
Should improve sparc64 and other be archs. ok matthew@ miod@
2014-04-22- one more mallocarray -> reallocarrayJason McIntyre
- use <>
2014-04-22change mallocarray to reallocarray. useful in a few more situations.Ted Unangst
malloc can, as always, be emulated via realloc(NULL). ok deraadt
2014-04-21correct man page sectionTheo de Raadt
2014-04-21Introducing: void *mallocarray(size_t nmemb, size_t size);Theo de Raadt
Like calloc(), except without the cleared-memory gaurantee ok beck guenther, discussed for more than a year...
2014-04-21Correctly document the return value of getenv(3)Philip Guenther
From Ben Cornett (ben (at) lantern.is)
2014-04-14print pid in error messages; ok reyk@Otto Moerbeek
2014-04-07Add some missing names to the NAME sections.Ingo Schwarze
For inet(3), go the other way, remove some bogus symlinks. Found while testing the new makewhatis(8). ok jmc@
2014-04-03Update Copyright notice; ok otto@ beck@ deraadt@.Ingo Schwarze
This is merely a by-product of figuring out the amount of phk@ code contained herein; i'm not planning to hack on this file.
2014-03-25Poul-Henning Kamp informed me he is allright with this licensing change.Bob Beck
2014-03-18Retire hp300, mvme68k and mvme88k ports. These ports have no users, keepingMiod Vallat
this hardware alive is becoming increasingly difficult, and I should heed the message sent by the three disks which have died on me over the last few days. Noone sane will mourn these ports anyway. So long, and thanks for the fish.
2014-03-16lint is dead (long live the lint!), so stop using it as a cpp conditionalPhilip Guenther
(namespace pollution!) or talking about its opinion on code. ok krw@
2014-01-21Ouch... recommend arc4random, not random.Theo de Raadt
spotted by tedu
2014-01-21obvious .Pa fixes; found with mandocdb(8)Ingo Schwarze