summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright for 2006.rwatson2006-02-111-1/+1
| | | | MFC after: 3 days
* The uma_zone data structure defines the size of its uz_cpu[] array as 1,rwatson2006-02-111-2/+24
| | | | | | | | | | | | | but then sizes the containing data structure at run-time to make room for per-cpu cache data. Modify libmemstat to separately allocate a buffer to hold per-cpu cache data, sized based on the run-time mp_maxid variable when using libkvm to access UMA data. This avoids reading invalid cache data from beyond the end of the uma_zone data structure on the stack, which can result in invalid statistics and/or reads from invalid kernel addresses. Foot target practice by: ps MFC after: 3 days
* When reporting an error reading from UMA per-cpu cache pointers using KVM,rwatson2006-02-111-4/+2
| | | | | | | | return a KVM error rather than an out of memory error, so that the caller reports the KVM error state. This replaces a misleading error message with a more accurate although equally confusing one. MFC after: 3 days
* Read all_cpus variable out of kmem, and validate CPUs against the all_cpusrwatson2006-02-111-0/+10
| | | | | | | | cpu mask before looking at the cache entries for the CPU. For systems with sparse CPU id arrays, this skips otherwise uninitialized cache structures. MFC after: 3 days
* Correct a typo in the extraction of zone information from UMA using kmem:rwatson2006-02-111-1/+1
| | | | | | bytes = allocated - freed, not bytes = allocated = freed. MFC after: 3 days
* Use ps_linfo to retrieve LWP info, current it is used to retrievedavidxu2006-02-071-0/+6
| | | | signal mask and pending signals.
* Use ps_linfo to retrieve LWP info.davidxu2006-02-071-1/+1
|
* Replace ptrace syscall with ps_lgetgregs to check a LWP's existence.davidxu2006-02-071-2/+2
|
* Always clear thread info buffer to zero.davidxu2006-02-062-0/+2
|
* Now, thread name is stored in kernel, userland no longer has to keep it.davidxu2006-02-053-7/+2
|
* use syscall thr_set_name to implement pthread_set_name_np.davidxu2006-02-051-9/+18
|
* Remove spurious "union arg" from printf.hphk2006-02-041-2/+3
| | | | Make sure to always print something in the alternate time format.
* The function isspace does not take a string argument. I have no idea howdfr2006-02-041-3/+3
| | | | this compiled before; it only worked by accident.
* Fix calculation of the number of arenas to use on multi-processor systems.jasone2006-02-041-1/+1
|
* Add libbsm to the library build.rwatson2006-02-022-1/+141
| | | | Obtained from: TrustedBSD Project
* Expand contractions.joel2006-02-011-1/+1
|
* Add missing 's' suffix on alternate rendition of time.phk2006-01-311-1/+1
|
* Instead of printing several pieces with .Sy just enclose the 'Note' blockharti2006-01-301-4/+6
| | | | | | into a .Bf/.Ef pair. Submitted by: ru
* - In pipe() return the error returned by pipe_create(), rather thenglebius2006-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
* If the sysctl kern.pts.enable doesn't exist, check that /dev/ptmx is there,cognet2006-01-291-2/+7
| | | | | | and if so, use the pts system. Suggested by: rwatson
* - Add a note that passing NULL to pidfile_write(), pidfile_remove() andpjd2006-01-281-3/+13
| | | | | | | pidfile_close() functions is safe. This possibility is used in example code. - Cast pid_t to int. Requested by: yar
* The .Nm macro prints Open_Disk() instead of libdisk, so use an expliciteharti2006-01-271-2/+2
| | | | argument to get 'libdisk'. Also bump the date of the man page.
* Revert 1.45 now that snmp_hostres uses libgeom.harti2006-01-272-0/+8
|
* Remove unwarranted uses of 'goto'.jasone2006-01-271-203/+153
|
* Add NO_MALLOC_EXTRAS, so that various extra features that can causejasone2006-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
* Fix the type of a statistics counter (unsigned --> unsigned long).jasone2006-01-271-1/+1
|
* Clean up statistics gathering and printing.jasone2006-01-271-71/+64
|
* Remove debug printf.pjd2006-01-261-1/+0
|
* Optimize arena_bin_pop() to reduce the number of separator operations.jasone2006-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.
* Fix an aliasing error in the new TP support and reenable it in the build.kientzle2006-01-262-3/+5
|
* Make getttyent() report what the pts ptys as well.cognet2006-01-261-1/+38
|
* ptsname() bits for pts.cognet2006-01-261-5/+45
|
* Teach openpty() how to deal with pts.cognet2006-01-261-0/+45
|
* Make the %V{is} extension handle a NULL pointer like %s does: output "(null)"phk2006-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.
* Add a dummy arm Write_Disk() function, and compile libdisk on arm.cognet2006-01-254-6/+52
|
* Move the Internet Society copyright message so that it appears in thedfr2006-01-2535-910/+910
| | | | formatted page as well as the source.
* Remove a redundant variable assignment in arena_reg_frag_alloc().jasone2006-01-251-1/+0
|
* If no coalesced exact-fit small regions are available, but delayed exact-jasone2006-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
* Add missing symbol pthread_set_name_np.davidxu2006-01-231-0/+2
|
* Make the 'C' and 'c' malloc options consistent with other options; 'C'jasone2006-01-231-2/+2
| | | | doubles the cache size, and 'c' halves the cache size.
* In arena_chunk_reg_alloc(), try to avoid touching the last page in thejasone2006-01-231-7/+24
| | | | | chunk during initialization, in order to avoid physically backing the page unless data are allocated there.
* Back out the previous change to rename.2. The previous rename()truckman2006-01-223-9/+8
| | | | | | | | | | | | | | behaviour of returning EINVAL when ".." is passed as either argument has been restored. rmdir("..") now returns EINVAL instead of EPERM. Document the previously undocumented behaviour of rmdir(".") returning EINVAL as required by POSIX and SUSv3. Bump the man page change date. undelete("..") now returns EINVAL instead of EPERM. Bump the man page change date. MFC after: 3 days
* rename(), rmdir(), and undelete() fail with EPERM if the last componenttruckman2006-01-213-0/+9
| | | | | | of the path is "..". MFC after: 3 days
* Use uintptr_t rather than size_t when casting pointers to integers. Also,jasone2006-01-201-44/+45
| | | | | | | fix the few remaining casting style(9) errors that remained after the functional change. Reported by: jmallett
* Revert addtion of assertions in revision 1.99. These assertions causejasone2006-01-191-7/+0
| | | | | | problems in cases where regions are faked up for the purposes of red-black tree searches, since those faked region headers reside on the stack, rather than in a malloc chunk.
* Add assertions that detect some forms of region separator corruption.jasone2006-01-191-0/+7
|
* Remove loops in arena_coalesce(). They are no longer necessary, now thatjasone2006-01-191-4/+5
| | | | | internal allocation does not rely on recursive arena use (base_arena was removed in revision 1.95).
* In order to maintain interoperability with certain broken FTP servers,des2006-01-191-2/+18
| | | | | | | ignore a MODE failure if and only if the mode we attempted to set was S (which is supposed to be the default). PR: bin/91973
* Make all internal variables and functions static.jasone2006-01-191-12/+15
| | | | Reported by: ache
* Return NULL if there is an OOM error during initialization, rather thanjasone2006-01-191-35/+50
| | | | | | | | allowing the error to be fatal. Move a label in order to make sure to properly handle errors in malloc(0). Reported by: Alastair D'Silva, Saneto Takanori
OpenPOWER on IntegriCloud