SQZ(4S)

NAME
sqz - driver to reduce available physical memory pages

SYNOPSIS
pseudo-device sqzn

DESCRIPTION

sqz is an optional driver used to reduce the number of physical memory pages available for any use (system or user). It is intended to approximate the behavior of a system with less physical memory. Alternatives are to patch the kernel variable physmem in /vmunix and reboot, or power down the system and remove memory boards.

Each minor device corresponds to a separate device which can independently reserve pages. Each device only supports exclusive open; when the device is closed, all the pages associated with it are returned to the system.

IOCTLS

sqz handles the following ioctl's, defined in <sun/sqz.h>:

SQZSET
    Requests a specified number of pages to be allocated. If fewer pages are requested than are currently allocated, the excess pages are returned to the system. If more pages are requested than are currently allocated, the balance is atomically allocated. Note: the allocation is atomic, and if more pages are required than are on the freelist, sqz will sleep until that many pages are available; hence, this ioctl can fail to complete if too many additional pages are requested at once.

SQZGET
    Fills in the following struct with the number of pages in each category:

        struct sqz_status {
        	int count;	/* allocated by this sqz device */
        	int total;	/* allocated by all sqz devices */
        };

FILES
/dev/sqz*

SEE ALSO
ioctl(4), sqz(8)