NetBSD/sys/kern
he bb89b7208d Extend struct malloc_type to count the number of active allocations
per size, and make vmstat report this information under the "Memory
statistics by type" display, which is only printed when the kernel
has been compiled with KMEMSTATS defined, like this:

Memory statistics by type                                Type  Kern
           Type InUse  MemUse HighUse   Limit   Requests Limit Limit Size(s)
          wapbl    15   4192K   4192K  78644K     376426     0     0 32:0,256:3,512:6,131072:1,262144:2,524288:3

Since struct malloc_type is user-visible and is changed, bump kernel
revision to 5.99.26.

While it is true that malloc(9) is in general on the path of slowly
being replaced by kmem(9) (kmem_alloc/kmem_free), there remains a
lot of points of usage of malloc/free, and this could aid in finding
any leaks.  (It helped finding the leak fixed in PR#42661.)

This was discussed with and somewhat hestitantly OKed by rmind@
2010-04-05 07:16:12 +00:00
..
bufq_disksort.c
bufq_fcfs.c
bufq_priocscan.c
bufq_readprio.c
cnmagic.c Replace more printfs with aprint_normal / aprint_verbose 2010-01-31 00:43:37 +00:00
core_elf32.c Merge from matt-nb5-mips64 2009-12-14 00:47:10 +00:00
core_elf64.c
core_netbsd.c
exec_aout.c
exec_ecoff.c
exec_elf32.c
exec_elf64.c
exec_elf.c fix debugging printf. 2010-04-02 14:11:18 +00:00
exec_macho.c
exec_script.c
exec_subr.c Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly 2009-12-10 14:13:48 +00:00
genlintstub.awk
init_main.c fix LOCKDEBUG panic 'uninitialized lock'. 2010-02-05 11:06:36 +00:00
init_sysctl_base.c Chop init_sysctl into base nodes (init_sysctl_base.c) and the 2009-09-16 15:03:56 +00:00
init_sysctl.c sysctl_doeproc: don't follow a possibly stale pointer. 2010-02-13 11:22:21 +00:00
init_sysent.c regen: lfs megamaid syscalls -> MODULAR 2010-03-02 19:37:02 +00:00
kern_acct.c The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live 2010-01-08 11:35:07 +00:00
kern_auth.c Tiny cosmetics... 2009-12-31 02:20:36 +00:00
kern_cctr.c
kern_clock.c
kern_condvar.c tsleep() on lbolt is now illegal. Convert cv_wakeup(&lbolt) to 2009-12-05 22:38:19 +00:00
kern_core.c The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live 2010-01-08 11:35:07 +00:00
kern_cpu.c introduce a new function that returns a unique string for each cpu: 2010-01-13 01:57:17 +00:00
kern_ctf.c make this compile. 2010-03-13 01:41:14 +00:00
kern_descrip.c If a multithreaded app closes an fd while another thread is blocked in 2009-12-20 09:36:05 +00:00
kern_drvctl.c If a multithreaded app closes an fd while another thread is blocked in 2009-12-20 09:36:05 +00:00
kern_event.c Use sizeof correct type, not pointer to wrong type. 2009-12-22 20:50:46 +00:00
kern_exec.c DTrace: Add an SDT (Statically Defined Tracing) provider framework, and 2010-03-01 21:10:13 +00:00
kern_exit.c remove redundant checks of PK_MARKER. 2010-03-03 00:47:30 +00:00
kern_fileassoc.c Oops - unintentional locking bit that's not yet ready. 2009-12-25 20:07:18 +00:00
kern_fork.c DTrace: Add an SDT (Statically Defined Tracing) provider framework, and 2010-03-01 21:10:13 +00:00
kern_hook.c This is using device_t, so it needs to include <sys/device.h>. 2010-01-31 09:27:40 +00:00
kern_idle.c set LP_RUNNING when starting lwp0 and idle lwps. 2009-07-19 10:11:55 +00:00
kern_ksyms.c DTrace: Make the CTF handling conditional on KDTRACE_HOOKS for now since 2010-03-14 21:27:49 +00:00
kern_kthread.c Remove uarea swap-out functionality: 2009-10-21 21:11:57 +00:00
kern_ktrace.c remove redundant checks of PK_MARKER. 2010-03-03 00:47:30 +00:00
kern_lock.c remove dated and wrong comments about curlwp being NULL. 2009-12-20 20:42:23 +00:00
kern_lwp.c DTrace: Add an SDT (Statically Defined Tracing) provider framework, and 2010-03-01 21:10:13 +00:00
kern_malloc_debug.c Add a flags argument to pmap_kenter_pa(9). 2009-11-07 07:27:40 +00:00
kern_malloc_stdtype.c g/c M_SOFTINTR 2009-11-06 13:32:41 +00:00
kern_malloc.c Extend struct malloc_type to count the number of active allocations 2010-04-05 07:16:12 +00:00
kern_module_vfs.c don't leak a vnode and don't call namei (implicitly) twice 2010-04-04 17:18:04 +00:00
kern_module.c Print builtin "use -f" message only if not autoloading. Otherwise 2010-03-18 18:25:45 +00:00
kern_mutex_obj.c Fix copyrights. 2010-03-31 19:59:39 +00:00
kern_mutex.c Re-apply: 2010-02-08 09:54:27 +00:00
kern_ntptime.c Use time_t (not long) to save time_second value. 2010-04-02 23:31:42 +00:00
kern_pax.c rename DEBUG_ASLR -> PAX_ASLR_DEBUG 2010-03-15 20:35:19 +00:00
kern_physio.c PR kern/39536: bufq related problem when writing DVDR and DVDRWs. 2009-05-26 14:59:31 +00:00
kern_pmf.c A pointer typedef entails trading too much flexibility to declare const 2010-02-24 22:37:54 +00:00
kern_proc.c Change RSS (resident set size) limit. Instead of setting it arbitrarily 2010-02-26 18:47:13 +00:00
kern_prot.c - Rearrange pg_delete() and pg_remove() (renamed pg_free), thus 2009-04-25 15:06:31 +00:00
kern_ras.c
kern_rate.c
kern_resource.c remove redundant checks of PK_MARKER. 2010-03-03 00:47:30 +00:00
kern_runq.c remove redundant checks of PK_MARKER. 2010-03-03 00:47:30 +00:00
kern_rwlock_obj.c Fix copyrights. 2010-03-31 19:59:39 +00:00
kern_rwlock.c Re-apply: 2010-02-08 09:54:27 +00:00
kern_sdt.c DTrace: Add an SDT (Statically Defined Tracing) provider framework, and 2010-03-01 21:10:13 +00:00
kern_sig.c remove redundant checks of PK_MARKER. 2010-03-03 00:47:30 +00:00
kern_sleepq.c Remove uarea swap-out functionality: 2009-10-21 21:11:57 +00:00
kern_softint.c softint_overlay: disable kernel preemption before curlwp->l_cpu use. 2010-01-09 19:02:17 +00:00
kern_ssp.c Switch SSP init output to aprint_debug() instead of aprint_normal() 2010-02-01 16:14:58 +00:00
kern_stub.c Remove fs_lfs now that the syscall is always defined. 2010-03-03 00:49:39 +00:00
kern_subr.c Place *hook implementations in kern_hook.c instead of them floating 2010-01-31 01:38:48 +00:00
kern_synch.c remove redundant checks of PK_MARKER. 2010-03-03 00:47:30 +00:00
kern_sysctl.c Minimize unnecessary differences in rump. 2010-01-13 01:53:38 +00:00
kern_tc.c __inline -> inline 2010-02-06 12:10:59 +00:00
kern_time.c Move most clock_getres syscall code, except for coypout call, to a new 2010-04-03 17:20:05 +00:00
kern_timeout.c
kern_todr.c Update default TOD value to 2010/01/01 12:00:00. 2010-01-02 10:57:35 +00:00
kern_turnstile.c turnstile_block: reduce code duplication. 2009-11-18 12:26:22 +00:00
kern_uidinfo.c
kern_uuid.c
kern_verifiedexec.c In veriexec_file_verify(), always check 'lockstate' before unlocking 2009-12-28 07:16:41 +00:00
kern_xxx.c
kgdb_stub.c
Make.tags.inc A definition in aic79xxvar.h somehow shadows pci_attach_args (ctags 2009-07-16 23:53:10 +00:00
Makefile
makesyscalls.sh Make is possible to add extra output at the top of syscallargs.h. 2010-03-02 19:33:12 +00:00
sched_4bsd.c sched_pstats_hook: fix estcpu decay. 2009-05-31 04:13:33 +00:00
sched_m2.c more s/the the/the/ 2009-11-22 19:09:15 +00:00
subr_autoconf.c Add init/fini for components (modules etc.). These eat the standard 2010-03-25 19:23:18 +00:00
subr_blist.c
subr_bufq.c Provide unwind log for bufq sysctls, since (theoretically) bufq might 2009-09-17 09:54:27 +00:00
subr_callback.c Add assert that ce->ce_func is not NULL. 2009-11-24 20:11:50 +00:00
subr_copy.c Split uiomove() and high-level copy routines out of the crowded 2009-11-04 16:54:00 +00:00
subr_debug.c
subr_device.c Device accessors are only marginally related to autoconf, so put them 2010-01-31 15:10:11 +00:00
subr_devsw.c In bdev_strategy, return ENXIO instead of panicing if the block device has 2009-09-03 11:42:21 +00:00
subr_disk_mbr.c Fix typo, no code change. 2009-12-23 09:23:53 +00:00
subr_disk_open.c Add helper function that determines the size and block size of a disk device. 2010-01-30 11:57:17 +00:00
subr_disk.c When truncating a request in bounds_check_with_mediasize() multiply 2009-11-28 22:38:07 +00:00
subr_evcnt.c
subr_exec_fd.c More changes to improve kern_descrip.c. 2009-05-24 21:41:25 +00:00
subr_extent.c
subr_hash.c
subr_humanize.c Give humanize_number & format_bytes their own spots in the sun and move 2009-10-02 15:48:41 +00:00
subr_iostat.c Create CTL_HW before creating nodes on top of it (sysctl constructors 2009-11-30 11:28:35 +00:00
subr_kmem.c Add kmem_asprintf rotuine which allocates string accordingly to format 2010-02-11 23:13:46 +00:00
subr_kobj_vfs.c Rename a few routines from _file() to _vfs() for consistency. 2010-01-19 22:17:44 +00:00
subr_kobj.c Due to the schizophrenic nature of kobj (mem + vfs source), 2009-11-27 17:54:11 +00:00
subr_lockdebug.c Make lockdebug_lock_print(NULL, ...) dump all locks. Now, in ddb, 2009-11-03 00:29:11 +00:00
subr_log.c
subr_once.c
subr_optstr.c
subr_pcq.c
subr_percpu.c Remove uarea swap-out functionality: 2009-10-21 21:11:57 +00:00
subr_pool.c pool_cache_invalidate: comment out invalidation of per-CPU caches (nobody depends 2010-01-20 23:40:42 +00:00
subr_prf.c On a recursive panic(), don't try to take a dump, as that may very 2010-01-26 12:59:50 +00:00
subr_prof.c Replace few USER_TO_UAREA/UAREA_TO_USER uses, reduce sys/user.h inclusions. 2009-12-17 01:25:10 +00:00
subr_specificdata.c
subr_spldebug.c Address some of the concerns that SPLDEBUG is not machine-independent, 2009-11-24 17:28:32 +00:00
subr_syscall_stats.c
subr_tftproot.c Back out previous change: do not skip the test on rootspec, but make it 2009-08-23 12:10:50 +00:00
subr_time.c - Move inittimeleft() and gettimeleft() to subr_time.c, where they belong. 2009-11-01 21:46:09 +00:00
subr_userconf.c Follow upstream's lead and remove third and fourth clauses (except on 2009-10-20 00:51:13 +00:00
subr_vmem.c
subr_workqueue.c workqueue_finiqueue: remove unused variable. 2009-11-11 14:54:40 +00:00
subr_xcall.c explicitly initialize static boolean 2009-11-30 15:37:56 +00:00
sys_aio.c aio_suspend1: remove wrong comment, add one new. 2010-01-30 21:23:46 +00:00
sys_descrip.c Make flock(2) more robust to invalid operation, such as 2009-10-28 18:24:44 +00:00
sys_generic.c Allow undescribed, direct ioctls as used by Unix. This capability was removed in BSD, presumably because nothing used it any more. 2009-08-13 08:57:43 +00:00
sys_lwp.c - Move inittimeleft() and gettimeleft() to subr_time.c, where they belong. 2009-11-01 21:46:09 +00:00
sys_module.c Move builtin modules to a list in init and load them from there 2010-03-05 18:35:01 +00:00
sys_mqueue.c If a multithreaded app closes an fd while another thread is blocked in 2009-12-20 09:36:05 +00:00
sys_pipe.c If a multithreaded app closes an fd while another thread is blocked in 2009-12-20 09:36:05 +00:00
sys_pmc.c
sys_process.c Replace few USER_TO_UAREA/UAREA_TO_USER uses, reduce sys/user.h inclusions. 2009-12-17 01:25:10 +00:00
sys_pset.c Move psets security policy back to the subsystem and keep suser logic only 2009-10-02 21:56:28 +00:00
sys_sched.c - Move sched_listener and co. from kern_synch.c to sys_sched.c, where it 2009-10-03 22:32:56 +00:00
sys_select.c Add comment about locking. 2009-12-20 23:00:59 +00:00
sys_sig.c Get rid of last "easy" kernel symbols starting with __: 2010-01-19 22:28:30 +00:00
sys_socket.c If a multithreaded app closes an fd while another thread is blocked in 2009-12-20 09:36:05 +00:00
sys_syscall.c
syscalls.c regen: lfs megamaid syscalls -> MODULAR 2010-03-02 19:37:02 +00:00
syscalls.conf Make is possible to add extra output at the top of syscallargs.h. 2010-03-02 19:33:12 +00:00
syscalls.master Make lfs syscalls loadable. This nukes fs_lfs.h & #ifdef LFS. 2010-03-02 19:34:26 +00:00
sysv_ipc.c
sysv_msg.c
sysv_sem.c semu_alloc: simplify a little. 2009-10-05 23:46:02 +00:00
sysv_shm.c shmexit: simplify a lot by avoiding unnecessary memory allocations, since 2009-10-05 23:47:04 +00:00
tty_bsdpty.c The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live 2010-01-08 11:35:07 +00:00
tty_conf.c
tty_ptm.c
tty_pty.c Amplify comment about ultrix bits. 2010-01-24 19:56:26 +00:00
tty_subr.c Christos was worried about clrbits() being called with a length of zero. 2009-11-14 13:18:41 +00:00
tty_tty.c
tty.c Check for zero length read here - and return zero. 2009-10-11 17:20:48 +00:00
uipc_accf.c call accept_filter_init int setopt so that don't use an uninitialized lock 2010-03-13 23:03:39 +00:00
uipc_domain.c KAUTH_GENERIC_CANSEE -> KAUTH_REQ_NETWORK_SOCKET_CANSEE. 2009-10-03 20:24:39 +00:00
uipc_mbuf2.c
uipc_mbuf.c Handle rump like the direct mapping case. 2010-02-08 22:55:36 +00:00
uipc_proto.c
uipc_sem.c
uipc_socket2.c Don't bother caching egid. It'll be removed soon. 2009-12-30 22:12:12 +00:00
uipc_socket.c Don't bother caching egid. It'll be removed soon. 2009-12-30 22:12:12 +00:00
uipc_syscalls.c Remove unnecessary call to kauth_cred_free(). 2010-01-21 04:40:22 +00:00
uipc_usrreq.c Fix typo in comment. 2010-02-09 23:05:16 +00:00
vfs_bio.c fs_ffs.h is no longer required (since the death of bufops / softdep) 2010-03-02 14:22:44 +00:00
vfs_cache.c
vfs_cwd.c The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live 2010-01-08 11:35:07 +00:00
vfs_dirhash.c
vfs_getcwd.c The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live 2010-01-08 11:35:07 +00:00
vfs_hooks.c
vfs_init.c - Add usermount_common_policy() that implements some common (everything 2009-10-05 04:20:13 +00:00
vfs_lockf.c lockf() passes its arguments through to fcntl() but is supposed to 2009-08-05 19:39:50 +00:00
vfs_lookup.c The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live 2010-01-08 11:35:07 +00:00
vfs_subr.c Add vrele_async routine which asynchronously release vnodes in different contex 2010-02-11 23:16:35 +00:00
vfs_syscalls.c remove redundant checks of PK_MARKER. 2010-03-03 00:47:30 +00:00
vfs_trans.c don't forget to skip marker processes. 2009-05-12 11:42:12 +00:00
vfs_vnops.c Stop exposing fifofs internals and leave only fifo_vnodeop_p visible. 2010-03-29 13:11:32 +00:00
vfs_wapbl.c Move block number computations to callers of wapl_read/wapl_write and 2010-02-27 16:51:03 +00:00
vfs_xattr.c Convert 67 namei call sites to use namei_simple, in these functions: 2009-06-29 05:08:15 +00:00
vnode_if.c regen: remove VNODE_LOCKDEBUG 2009-09-29 11:54:52 +00:00
vnode_if.sh Generate scheduling points around rump vnode operations. 2009-10-15 00:29:40 +00:00
vnode_if.src