summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Modify allocation policy, in order to avoid excessive fragmentation forJason Evans2006-03-172-2503/+1070
| | | | | | | | | | | | | | | | | | allocation patterns that involve a relatively even mixture of many different size classes. Reduce the chunk size from 16 MB to 2 MB. Since chunks are now carved up using an address-ordered first best fit policy, VM map fragmentation is much less likely, which makes smaller chunks not as much of a risk. This reduces the virtual memory size of most applications. Remove redzones, since program buffer overruns are no longer as likely to corrupt malloc data structures. Remove the C MALLOC_OPTIONS flag, and add H and S. Notes: svn path=/head/; revision=156800
* Allow bsd.lib.mk to generate the symbol version map.Daniel Eischen2006-03-161-14/+6
| | | | Notes: svn path=/head/; revision=156773
* Fix comment.Ruslan Ermilov2006-03-161-1/+1
| | | | Notes: svn path=/head/; revision=156770
* Desupport the undocumented NO_QUAD option, just don't compileRuslan Ermilov2006-03-165-21/+4
| | | | | | | the quad support on 64-bit platforms. Notes: svn path=/head/; revision=156769
* Add a non-optional newline after ".Bx".Ruslan Ermilov2006-03-151-1/+2
| | | | Notes: svn path=/head/; revision=156741
* Revert previous changes as we do support the .Ox macro for OpenBSD.Andre Oppermann2006-03-151-2/+4
| | | | | | | Pointed out by: ceri, ru, delphij Notes: svn path=/head/; revision=156739
* POSIXed strtoll() (and ours one too) can set errno to EINVAL, so checkAndrey A. Chernov2006-03-141-1/+1
| | | | | | | | | it first. Approved by: andre Notes: svn path=/head/; revision=156716
* Fix HISTORY and point to OpenBSD.Andre Oppermann2006-03-141-5/+2
| | | | Notes: svn path=/head/; revision=156708
* Import of OpenBSD's strtonum(3) which is a nicer version of strtoll(3)Andre Oppermann2006-03-144-3/+227
| | | | | | | | | | | providing proper error checking and other improvements. Obtained from: OpenBSD Requested by: flz (to port Open[BGP|OSPF]D) MFC after: 3 days Notes: svn path=/head/; revision=156707
* ns_name_skip was recently redefined to __ns_name_skipDaniel Eischen2006-03-131-1/+1
| | | | | | | | | like the others in <include/arpa/nameser.h>. Submitted by: ume Notes: svn path=/head/; revision=156669
* Make _spinunlock() point to the spinunlock stub, not theDaniel Eischen2006-03-131-1/+1
| | | | | | | spinlock stub. Notes: svn path=/head/; revision=156614
* Add each directory's symbol map file to SYM_MAPS.Daniel Eischen2006-03-1328-1/+48
| | | | Notes: svn path=/head/; revision=156613
* Add hooks to build libc with symbol versioning. This isDaniel Eischen2006-03-131-0/+14
| | | | | | | | | | | disabled by default; add SYMVER_ENABLED=true to /etc/make.conf to enable it. libc should get a version bump before this is enabled by default. Reviewed by: davidxu Notes: svn path=/head/; revision=156609
* Add symbol maps and initial symbol version definitions to libc.Daniel Eischen2006-03-1329-0/+3241
| | | | | | | Reviewed by: davidxu Notes: svn path=/head/; revision=156608
* Add entries for new pthread stubs.David Xu2006-03-101-0/+30
| | | | Notes: svn path=/head/; revision=156530
* Remove mq.c, the POSIX mqueue is implemented in librt.David Xu2006-03-081-73/+0
| | | | | | | Suggested by: deischen Notes: svn path=/head/; revision=156450
* Add some more pthread stubs so that librt can use them.Daniel Eischen2006-03-053-31/+168
| | | | | | | | | | The thread jump table has been resorted, so you need to keep libc, libpthread, and libthr in sync. Submitted by: xu Notes: svn path=/head/; revision=156319
* Remove a useless word.Christian Brueffer2006-03-051-1/+1
| | | | | | | | | PR: 94087 Submitted by: Tadaaki Nagao <nagao@iij.ad.jp> MFC after: 3 days Notes: svn path=/head/; revision=156309
* Sync with actual code.Jesus R. Camou2006-03-031-2/+6
| | | | | | | | | | | PR: docs/87681 Noticed by: Andreas Kohn <andreas@syndrom23.de> Reviewed by: brooks Approved by: trhodes (mentor) MFC after: 3 days Notes: svn path=/head/; revision=156242
* Fix the %Q printf extension to behave as expectedPoul-Henning Kamp2006-03-021-19/+9
| | | | Notes: svn path=/head/; revision=156207
* Handle the errors returned by res_querydomain() in same manner.Hajimu UMEMOTO2006-03-012-0/+40
| | | | | | | | | Reported by: yar Tested by: yar, Rostislav Krasny <rosti.bsd__at__gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=156155
* Disconnect mqueue from buildworld, as I will implement it in seperatedDavid Xu2006-03-011-1/+1
| | | | | | | library. Notes: svn path=/head/; revision=156133
* Const'ify arguments to a couple of functions to fix breakageDaniel Eischen2006-02-281-2/+2
| | | | | | | with -O2. Notes: svn path=/head/; revision=156109
* Don't do a time travel to 12006...Xin LI2006-02-281-1/+1
| | | | Notes: svn path=/head/; revision=156103
* Staticize a couple of functions.Daniel Eischen2006-02-2723-71/+106
| | | | | | | | | Remove a few unused locks. Remove locks from application namespace. Notes: svn path=/head/; revision=156090
* Correct a comment.Daniel Eischen2006-02-273-22/+6
| | | | | | | | | | | | Staticize two tables thare are not visible in <resolv.h> and which are also local in Solaris' libresolv. Remove two functions that are not referenced in libc nor anywhere else I can find, not visible in <resolv.h> and which are also local in Solaris libresolv. Notes: svn path=/head/; revision=156089
* Fix typo in manual page reference.Wojciech A. Koszek2006-02-261-1/+1
| | | | | | | | Approved by: cognet (mentor) MFC after: 3 days Notes: svn path=/head/; revision=156043
* Sync inet_net_pton() and inet_net_ntop() with latest BIND9's includesHajimu UMEMOTO2006-02-263-85/+420
| | | | | | | | | | | | an IPv6 support. PR: kern/93740 Submitted by: Rudolf Cejka <cejkar__at__fit.vutbr.cz> Obtained from: BIND9 MFC after: 1 week Notes: svn path=/head/; revision=156018
* - Just query 'as is', if there is a trailing dot in the name.Hajimu UMEMOTO2006-02-242-18/+40
| | | | | | | | | | | | | - Don't query 'as is' twice. PR: bin/62139 Reported by: Rostislav Krasny <rosti.bsd__at__gmail.com> Tested by: Rostislav Krasny <rosti.bsd__at__gmail.com> Obtained from: BIND9 (with some modification) MFC after: 1 week Notes: svn path=/head/; revision=155983
* Tell the truth about a) how to get the first fileid, andYaroslav Tykhiy2006-02-221-5/+10
| | | | | | | | | | | b) what return values from kldstat(2) can be expected. Bump .Dd. MFC after: 3 days Notes: svn path=/head/; revision=155912
* - Massage wording to make it easier to understand and fix some grammar.Brad Davis2006-02-161-4/+4
| | | | | | | | | | Submitted by: sbahra at gwu dot edu Reviewed by: ru@ Approved by: ceri@ MFC after: 3 days Notes: svn path=/head/; revision=155750
* Remove extra slash from pty slave device name returned by ptsname.Alexander Kabaev2006-02-131-1/+1
| | | | Notes: svn path=/head/; revision=155593
* Remove spurious "union arg" from printf.hPoul-Henning Kamp2006-02-041-2/+3
| | | | | | | Make sure to always print something in the alternate time format. Notes: svn path=/head/; revision=155300
* Fix calculation of the number of arenas to use on multi-processor systems.Jason Evans2006-02-041-1/+1
| | | | Notes: svn path=/head/; revision=155272
* Expand contractions.Joel Dahl2006-02-011-1/+1
| | | | Notes: svn path=/head/; revision=155181
* Add missing 's' suffix on alternate rendition of time.Poul-Henning Kamp2006-01-311-1/+1
| | | | Notes: svn path=/head/; revision=155085
* - In pipe() return the error returned by pipe_create(), rather thenGleb Smirnoff2006-01-301-1/+3
| | | | | | | | | | | hardcoded ENFILES, which is incorrect. pipe_create() can fail due to ENOMEM. - Update manual page, describing ENOMEM return code. Reviewed by: arch Notes: svn path=/head/; revision=155035
* If the sysctl kern.pts.enable doesn't exist, check that /dev/ptmx is there,Olivier Houchard2006-01-291-2/+7
| | | | | | | | | and if so, use the pts system. Suggested by: rwatson Notes: svn path=/head/; revision=154965
* Remove unwarranted uses of 'goto'.Jason Evans2006-01-271-203/+153
| | | | Notes: svn path=/head/; revision=154890
* Add NO_MALLOC_EXTRAS, so that various extra features that can causeJason Evans2006-01-271-3/+16
| | | | | | | | | | | | performance degradation can be disabled via something like the following in /etc/malloc.conf: CFLAGS+=-DNO_MALLOC_EXTRAS Suggested by: deischen Notes: svn path=/head/; revision=154887
* Fix the type of a statistics counter (unsigned --> unsigned long).Jason Evans2006-01-271-1/+1
| | | | Notes: svn path=/head/; revision=154886
* Clean up statistics gathering and printing.Jason Evans2006-01-271-71/+64
| | | | Notes: svn path=/head/; revision=154882
* Remove debug printf.Pawel Jakub Dawidek2006-01-261-1/+0
| | | | Notes: svn path=/head/; revision=154857
* Optimize arena_bin_pop() to reduce the number of separator operations.Jason Evans2006-01-261-13/+10
| | | | | | | | | | | Remove the block of code that tries to use delayed regions in LIFO order, since from a policy perspective, it conflicts with LRU caching of newly coalesced regions in arena_undelay(). There are numerous policy alternatives, and it isn't readily obvious which (if any) is superior; this change at least has the virtue of being consistent with policy. Notes: svn path=/head/; revision=154853
* Make getttyent() report what the pts ptys as well.Olivier Houchard2006-01-261-1/+38
| | | | Notes: svn path=/head/; revision=154838
* ptsname() bits for pts.Olivier Houchard2006-01-261-5/+45
| | | | Notes: svn path=/head/; revision=154836
* Make the %V{is} extension handle a NULL pointer like %s does: output "(null)"Poul-Henning Kamp2006-01-255-1/+187
| | | | | | | | | | | | | | | | Add %M{essage} extension which prints an errno value as the corresponding string if possible or numerically otherwise. It is not currently possible to do the syslog(3) like %m extension because errno would need to get capatured on entry to the first function in the printf family, so %M requires you to supply errno as an argument. Add %Q{uote} extension which will print a string in double quotes with appropriate back-slash escapes (only) if necessary. Notes: svn path=/head/; revision=154815
* Remove a redundant variable assignment in arena_reg_frag_alloc().Jason Evans2006-01-251-1/+0
| | | | Notes: svn path=/head/; revision=154798
* If no coalesced exact-fit small regions are available, but delayed exact-Jason Evans2006-01-251-173/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fit regions are available, use the delayed regions in LIFO order, in order to increase locality of reference. We might expect this to cause delayed regions to be removed from the delay ring buffer more often (since we're now re-using more recently buffered regions), but numerous tests indicate that the overall impact on memory usage tends to be good (reduced fragmentation). Re-work arena_frag_reg_alloc() so that when large free regions are exhausted, it uses small regions in a way that favors contiguous allocation of sequentially allocated small regions. Use arena_frag_reg_alloc() in this capacity, rather than directly attempting over-fitting of small requests when no large regions are available. Remove the bin overfit statistic, since it is no longer relevant due to the arena_frag_reg_alloc() changes. Do not specify arena_frag_reg_alloc() as an inline function. It is too large to benefit much from being inlined, and it is also called in two places, only one of which is in the critical path (the other call bloated arena_reg_alloc()). Call arena_coalesce() for a region before caching it with arena_mru_cache(). Add assertions that detect the attempted caching of adjacent free regions, so that we notice this problem when it is first created, rather than in arena_coalesce(), when it's too late to know how the problem arose. Reported by: Hans Blancke Notes: svn path=/head/; revision=154797
* Make the 'C' and 'c' malloc options consistent with other options; 'C'Jason Evans2006-01-231-2/+2
| | | | | | | doubles the cache size, and 'c' halves the cache size. Notes: svn path=/head/; revision=154700