Oracle Solaris Tunable Parameters Reference Manual



The Solaris kernel memory allocator has various debugging and test options that were extensively used during the internal development cycle of the Solaris OS. Starting in the Solaris 2.5 release, a subset of these options became available. They are controlled by the kmem_flags variable, which was set with a kernel debugger, and then rebooting the system. Because of issues with the timing of the instantiation of the kernel memory allocator and the parsing of the /etc/system file, it was not possible to set these flags in the /etc/system file until the Solaris 8 release.

Five supported flag settings are described here.






The allocator maintains a log that contains recent history of its activity. The number of items logged depends on whether CONTENTS is also set. The log is a fixed size. When space is exhausted, earlier records are reclaimed.



The allocator writes a pattern into freed memory and checks that the pattern is unchanged when the buffer is next allocated. If some portion of the buffer is changed, then the memory was probably used by a client that had previously allocated and freed the buffer. If an overwrite is identified, the system panics. 



The allocator provides extra memory at the end of the requested buffer and inserts a special pattern into that memory. When the buffer is freed, the pattern is checked to see if data was written past the end of the buffer. If an overwrite is identified, the kernel panics. 



The allocator logs up to 256 bytes of buffer contents when the buffer is freed. This flag requires that AUDIT also be set.

The numeric value of these flags can be logically added together and set by the /etc/system file, starting in the Solaris 8 release, or for previous releases, by booting kadb and setting the flags before starting the kernel.



Does minimal integrity checking when a buffer is allocated and freed. When enabled, the allocator checks that the redzone has not been written into, that a freed buffer is not being freed again, and that the buffer being freed is the size that was allocated. This flag is available as of the Solaris 7 3/99 release. Do not combine this flag with any other flags. 

Data Type

Signed integer


0 (disabled)


0 (disabled) or 1 - 15 or 256 (0x100)


Yes. Changes made during runtime only affect new kernel memory caches. After system initialization, the creation of new caches is rare.



When to Change

When memory corruption is suspected

Commitment Level