Virtual storage management

You use the virtual storage area assigned to your job step by making implicit and explicit requests for virtual storage. (In addition to the virtual storage requests that you make, the system also can request virtual storage to contain the control blocks required to manage your tasks.)

Some macros represent implicit requests for storage. For example, when you invoke LINK to pass control to another load module, the system allocates storage before bringing the load module into your job pack area.

The GETMAIN or STORAGE macro is an explicit request for virtual storage below the 2 gigabyte address. When you make an explicit storage request, the system allocates to your task the number of virtual storage bytes that you request. The macros also allow you to specify where the central storage that backs the virtual storage resides; below 16 megabytes, below 2 gigabytes, or anywhere.

The CPOOL macro and callable cell pool services are also explicit requests for storage below the 2 gigabyte address. The macro and the services provide an area called a cell pool from which you can obtain cells of storage. Using the CPOOL macro and Callable cell pool services describe how you can create and manage cell pools.

The IARV64 macro is an explicit request for virtual storage above the 2-gigabyte address. You make the request for a chunk of storage called a “memory object”. The system creates the memory object you request and assigns ownership to your task or a task you specify. It is expected that most programs will continue to use virtual storage below the 2-gigabyte address, which is the topic of this chapter. If you are interested in using virtual storage above the 2-gigabyte address, see Using the 64-bit address space.

The DSPSERV macro is an explicit request for virtual storage that is not part of your address space. It is available for storing data, but not executing code. The two kinds of data-only spaces are data spaces and hiperspaces. For information on how to obtain and manage these virtual storage areas, see Data spaces and hiperspaces.

Note: If your job step is to be executed as a non-pageable (V=R) task, the REGION parameter value specified on the JOB or EXEC statement determines the amount of virtual (real) storage reserved for the job step. If you run out of storage, increase the REGION parameter size.

This chapter describes techniques you can use to obtain and release virtual storage below the 2 gigabyte address and make efficient use of the virtual storage area reserved for your job step.