kmem_debug - kernel memory debug module
kmem_debug is a kernel memory debug module used to debug kernel memory.
It is intended to be used only by those involved in writing and debugging
device drivers or other parts of the kernel.
To use kmem_debug, several steps must be taken to prepare the system:
1. kmem_debug must be manually installed by the user because it is not
installed on the system as shipped from the factory. kmem_debug is
only available if eoe.sw.kdebug has been installed.
2. Alterations must be made to the file /var/sysgen/system/irix.sm to
build a kernel capable of being debugged. kmem must be replaced with
kmem_debug in the /var/sysgen/system/irix.sm file.
Specifically the line
must be changed to
3. The program autoconfig(1M) must be run to generate a new kernel, and
the system must be rebooted.
There are three kernel tuneable parameters which direct the actions of
the kmem_debug module.
This tuneable indicates the lower bound of the range of zones to
This tuneable indicates the upper bound of the range to split. The
min and max tuneables split up the zones, but do not make them
private and do not show the structures which use those zones. In
order to do that you may want to use kmem_split_zone.
If you suspect there is a memory leak in a particular zone, set
kmem_split_zone to that zone size. It makes the zone for that size
private. It shows a separate structure for each zone. You must
remake the kernel and reboot for this tuneable to start working.
You may then use icrash to look at the zone, or run the tool
memleak(1M) to generate a report indicating whether there are memory
Zone memory consists of a number of zones of differing sizes. Since
there is limited table space for zones, structures with sizes close to
each other are lumped together in the same zone. For example, structures
that have a size of 712 bytes may be put into the zone listed as size
768. In cases like this, you may need to know the exact size of the
structure you wish to split when using kmem_split_zone. kmem_split_zone
should not be used with kmem_make_zones_private_max and
kmem_make_zones_private_min. There is limited table space for zones and
using all three tuneables may result in the configuration of an
PPPPaaaaggggeeee 2222 [ Back ]