Sun Studio 12: C User's Guide

B.2.120 -xpagesize=n

Sets the preferred page size for the stack and the heap.

The n value must be one of the following: 4k, 8K, 64K, 512K, 2M, 4M, 32M, 256M, 2G, 16G, or default. If you do not specify a valid page size, the request is silently ignored at run-time.

You must specify a valid page size for the target platform.

Use the getpagesize(3C) command on the Solaris operating system to determine the number of bytes in a page. The Solaris operating system offers no guarantee that the page size request will be honored. You can use pmap(1) or meminfo(2) to determine page size of the target platform.

You can use pmap(1) or meminfo(2) to determine page size of the target platform.

The -xpagesize option has no effect unless you use it at compile time and at link time. For a complete list of all compiler options that must be specified at both compile time and at link time, see Table A–2.


Note –

This feature is not available on the Solaris 8 operating system. A program compiled with this option will not link on the Solaris 8 operating system.


If you specify -xpagesize=default, the Solaris operating system sets the page size.

Compiling with this option has the same effect as setting the LD_PRELOAD environment variable to mpss.so.1 with the equivalent options, or running the Solaris command ppgsz(1) with the equivalent options before running the program. See the Solaris man pages for details.

This option is a macro for -xpagesize_heap and -xpagesize_stack. These two options accept the same arguments as -xpagesize: 4k, 8K, 64K, 512K, 2M, 4M, 32M, 256M, 2G, 16G, or default. You can set them both with the same value by specifying -xpagesize or you can specify them individually with different values.