The GETMAIN macro and the STORAGE macro with the OBTAIN parameter allocate virtual storage. The FREEMAIN macro and the STORAGE
macro with the RELEASE parameter free virtual storage.
Most of the functions of GETMAIN, FREEMAIN, and STORAGE are available
to all users. You can find information on these functions in
z/OS MVS Programming: Assembler Services Guide.
However,
some of the GETMAIN, FREEMAIN, and STORAGE functions are available
only to authorized programs. This information provides help in the
following areas:
- To help you decide which of the macros to use to obtain and release
storage, see Comparison of GETMAIN/FREEMAIN macros with the STORAGE macro.
- To learn how your program can enter the GETMAIN and FREEMAIN macro
service routines through a branch instruction, see Specifying branch entry to GETMAIN and FREEMAIN services.
- To learn how your program can use STORAGE and GETMAIN to obtain
storage with a specific storage protection key. See Selecting the storage key.
- To learn how your program can use the STORAGE macro to obtain
and release storage in an address space that is not the primary, see Obtaining storage in another address space.
- To learn how to choose the right subpool for your storage request,
see Selecting the right subpool for your virtual storage request.
- To learn how your program can associate storage to be obtained
with an address space or the system (so the system can track ownership
of CSA, ECSA, SQA, and ESQA storage), see Tracking virtual storage allocation (CPOOL BUILD, GETMAIN, and STORAGE OBTAIN macros).