summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/malloc.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-06-26after a talk with ariane, use MAP_FIXED for mquery to avoid the cost oftedu1-2/+2
scanning for free space if the hint isn't available. also, on further inspection, this will prevent pmap_prefer from "improving" our hint.
2012-06-24Change arc4random_uniform() to calculate ``2**32 % upper_bound'' asmatthew1-12/+3
``-upper_bound % upper_bound''. Simplifies the code and makes it the same on both ILP32 and LP64 architectures, and also slightly faster on LP64 architectures by using a 32-bit remainder instead of a 64-bit remainder. Pointed out by Jorden Verwer on tech@ ok deraadt; no objections from djm or otto
2012-06-24- document newly imported AF_INET6 support to net_inet_{pton,ntop}gilles1-5/+26
diff from Florian Obser, ok jmc@
2012-06-22add support for AF_INET6 to inet_net_pton() and inet_net_ntop()gilles2-2/+68
using inet_pton() and inet_ntop() as suggested by claudio ok claudio@
2012-06-22two changes which should improve realloc. first, fix zapcacheregion totedu1-10/+19
clear out the entire requested area, not just a perfect fit. second, use mquery to check for room to avoid getting an address we don't like and having to send it back.
2012-06-20two small fixes to free page cache. first, we need two nibbles of randomtedu1-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
2012-06-18Support larger-than-page-alignment requests in posix_memalign() bymatthew2-23/+130
overallocating and then releasing unneeded memory pages. ok otto
2012-06-02Update STANDARDS section for a few <stdlib.h> functionsguenther4-14/+35
Update SYNOPSIS for setkey() to show it's in <stdlib.h> ok jmc@, millert@
2012-06-01Improve standards conformance: ecvt(), fcvt(), gcvt(), mktemp(), ttyslot(),guenther3-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@
2012-04-26Add strnlen() to libkern.matthew1-1/+5
ok deraadt
2012-04-22Document that getpeereid() works for SOCK_SEQPACKET sockets too.matthew1-3/+5
2012-04-20use "an addrinfo", not "a addrinfo". ok jmcsthen1-3/+3
2012-04-20rearrange DESCRIPTION somewhat to make this page more readable;jmc1-39/+40
from Lawrence Teo
2012-04-19cherrypick fix for CVE-2012-2110: libcrypto ASN.1 parsing heap overflowdjm6-28/+122
ok miod@ deraadt@
2012-04-12alloca is NOT machine dependent; it has exactly the samederaadt1-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.
2012-04-10Do not pick the network number as alias on entries with no aliaseric1-3/+2
defined. ok deraadt@
2012-04-03tweak previous;jmc1-3/+3
2012-04-02simplify the strlcpy/strlcat manual page substantially. do lessderaadt1-70/+58
explaining of "what a C string is", and make it more clear that these functiosn BEHAVE EXACTLY LIKE snprintf with "%s"! (anyone who wants to write a 'strlcpy considered harmful' paper should probably write a 'strlcpy and snprintf considered harmful' paper instead). note to those from other projects reading this commit message: It would be very good if this new manual was picked up in your project. ok jmc millert krw
2012-04-01error out if accept() failsderaadt1-1/+3
2012-03-26Bump standards years, as we conform to the new versions tooguenther1-4/+4
ok jmc@
2012-03-26strsignal() was standardized in POSIX-2008guenther1-2/+7
ok millert@
2012-03-21Fix a bug where random() always returns 0 when srandom() is seededmillert1-2/+3
with 0. Use 1 and not 0 as the first element of the state array, similar to what glibc does. OK nicm@
2012-03-20the disease is spreadingdlg1-3/+3
2012-03-17remove IP_JUMBO, SO_JUMBO, and RTF_JUMBO.dlg1-13/+4
no objection from mcbride@ krw@ markus@ deraadt@
2012-03-08fix format strings for size_tespie1-3/+3
ok okan@
2012-02-29- Test for the retrieved page address not being NULL. This turns free((void*)1)otto1-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.
2012-02-09Update comments. ok deraadt@lum1-4/+3
2012-02-09Remove unused protocol value check. ok brynet@lum1-4/+1
2012-02-07Expand the CAVEAT section to more fully describe the behaviour oflum1-6/+13
the -uz combination. This diff stems from a diff by brynet@ sent to tech@ help from jmc@ regarding wording.
2012-02-06Revert previous diff as it resulted in the wrong return code whenguenther1-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@
2012-01-17fix SEE ALSO;jmc1-2/+2
2012-01-17Add stpcpy() and stpncpy(), pointless crap that made it into POSIX.guenther4-3/+222
Includes friendly linker warning to wake up those dumb enough to use it. Committing for kettenis@, who ran away to the hills after writing it
2012-01-17net_addrcmp() dies. found out to be a horrific function by ericderaadt3-158/+3
ok guenther
2012-01-14grammar;jmc1-2/+2
2012-01-14this is sparta^WPOSIX 2008espie1-2/+7
okay millert@
2012-01-05OpenSSL 1.0.0f: crank minordjm3-3/+3
2012-01-05OpenSSL 1.0.0f: mergedjm61-316/+782
2012-01-05OpenSSL 1.0.0f: import upstream sourcedjm26-86/+191
2012-01-05OpenSSL 1.0.0f: import upstream sourcedjm35-149/+432
2012-01-05OpenSSL 1.0.0f: import upstream sourcedjm13-116/+380
2012-01-03draft-ietf-ipv6-scoping-arch-02 has become RFC 4007, as noted byjmc2-12/+10
Poul-Henning Kamp, freebsd pr docs/163771; ok sthen
2011-12-08strdup and strndup both use malloc. Make this fact explicit.lum1-3/+5
ok jmc@
2011-11-17Complete the HISTORY of all syscalls that exist since Version 1 AT&T UNIX.schwarze1-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).
2011-11-06return non-zero on errorotto1-4/+6
2011-11-05and clean extra targetotto1-1/+2
2011-11-05add exhaust test from netbsdotto2-2/+188
2011-11-03crank major for openssl-1.0.0edjm3-3/+3
2011-11-03openssl-1.0.0e: resolve conflictsdjm255-2118/+4328
2011-11-03import OpenSSL 1.0.0edjm179-1799/+5399
2011-11-03import OpenSSL 1.0.0edjm110-830/+1337