VM Resident Executables update:
authorHiten Pandya <hmp@dragonflybsd.org>
Thu, 3 Jun 2004 16:28:15 +0000 (16:28 +0000)
committerHiten Pandya <hmp@dragonflybsd.org>
Thu, 3 Jun 2004 16:28:15 +0000 (16:28 +0000)
commit59e2aa1159caf3b16981b104c5a49f61c553e72c
tree73724dd9b30151ff8cbbb16d247d6c5d217fde02
parent68925b20eb431f4ee7803c7b8cba127efd06195b
VM Resident Executables update:

Kernel Part:

* decrement the exec_res_id counter in exec_sys_unregister, otherwise
  we will have an incorrect count of currently resident executables.

* add a structure called 'xresident' which stores enough information
  about resident executables, so that we can export it to userland
  via sysctl; the structure resides in sys/resident.h.

* add a sysctl node, called 'vm.resident' which enumerates though
  exec_res_list, i.e., the queue which stores information about the
  executables that are currently resident

* move the exec_res_list queue initialization and a MALLOC_DEFINE
  near the top of the file, right after the include files; and also
  initialize the exec_res_id counter to '0'.

NOTE! The 'vm.resident' sysctl node is only available to root!

Userland Part:

* add a '-l' option to resident(8), so that it displays the list
  of executables that are currently memory-resident.

* update the program usage string so that it is in par with the
  functionality offered by the program.

* update the manual page.

Requested-by: many...
Discussed-with:  Matthew Dillon <dillon@backplane.com>
sys/kern/imgact_resident.c
sys/sys/resident.h
usr.sbin/resident/resident.8
usr.sbin/resident/resident.c