rmss command
You can use the rmss command to change the memory size and exit or as a driver program that executes a specified application multiple times over a range of memory sizes and displays important statistics that describe the application's performance at each memory size.
The first method is useful when you want to get the look and feel of how your application performs at a given system memory size, when your application is too complex to be expressed as a single command, or when you want to run multiple instances of the application. The second method is appropriate when you have an application that can be invoked as an executable program or shell script file.