Show TOC

Process documentationAllocating Memory for User Contexts (UNIX) Locate this document in the navigation structure

 

The memory management system assigns memory to user contexts from the following areas: roll area, SAP extended memory, and heap memory.

The order of assignment from these memory areas arranges itself according to whether the user context runs in an SAP dialog work process or in another SAP work process. This enables the SAP system to optimally use the characteristics of the individual memory types.

When allocating memory, the following characteristics for individual memory types become noticeable.

Memory Type

Characteristics

SAP Roll Area

Sequential memory allocation to several work processes using a relatively slow copying process

SAP extended memory

Sequential memory allocation to several work processes using a fast allocation process Uses swap space

Private Memory

Allocation to a local work process, as required for the running user context in the process Uses swap space

Process

The flow depends on whether it is a dialog work process or not. Unlike other work process types, dialog work processes require frequent context changes. Private memory that is linked to a work process is only assigned if there are no other options.

Allocating Memory for Dialog Work Processes

The following graphic shows how the memory management system assigns memory to a dialog work process with different memory types. Normally, dialog work processes process requests from dialog users of the SAP system.

This graphic is explained in the accompanying text.

  1. For technical reasons, the roll area provides the first 100 to 250 KB (depending on the operating system) for the user context. Additional memory for this initial assignment sets itself according to the system profile parameter ztta/roll_first. If, for example, ztta/roll_first is set to 1000000(1 MB), approximately 1.2 MB roll area is provided. If ztta/roll_first is set to 1, only the technically necessary amount is allocated to roll memory.)

  2. If the memory from the roll area is not sufficient for the user context, more memory is provided from the SAP Extended Memory. Extended memory is available for the user context until one of the following conditions is satisfied:

    • The work process has reached the limit of the SAP extended memory for work processes. This limit is set in the system profile parameter ztta/roll_extension.

    • The SAP extended memory is used up. The size of the extended memory pool is set in the system profile parameter em/initial_size_MB.

  3. If this memory is also insufficient for the user context, more memory is provided from the roll area until this area is completely used up, or until the limit set in ztta/roll_area is reached. The roll memory now available sets itself according to the difference between the 2 parameter values ztta/roll_area (total memory in the roll area) and ztta/roll_first (size of assigned roll memory in step 1).

  4. If the user context still requires additional memory, it is assigned heap memory (Private Memory). Heap memory is available until one of the following situations occurs:

    • SAP restrictions

      Either the limit of the heap memory for dialog work processes is reached (defined in the system profile parameter abap/heap_area_dia), or the entire heap memory of all work processes for an SAP application server reaches its limits (defined in parameter abap/heap_area_total).

    • Operating system limits for allocating memory

    • The swap space in the host system is used up or the upper limit of the operating system address space (as determined by the 32-bit architecture) is reached.

      Try to avoid these situations at all times. To avoid this situation, you must set parameter abap/heap_area_total correctly.

Allocating Memory for Other Work Processes

The following graphic shows how the memory management system assigns memory to non-dialog work process (background, update, lock and spool work processes) with different memory types.

This graphic is explained in the accompanying text.

  1. The memory is taken from the roll area until the area is used up. The maximum size of the roll area is set in the system profile parameter ztta/roll_area.

  2. If the roll area is full, heap memory is allocated to the work process. Heap memory is available until one of the following situations occurs:

    • SAP restrictions

      Either the limit of the heap memory for non-dialog work processes is reached (defined in the system profile parameter abap/heap_area_nondia), or the entire heap memory of all work processes for an SAP application server reaches its limits (defined in parameter abap/heap_area_total).

    • Operating system limits for allocating memory

    • The swap space in the host system is used up. This situation should never occur (see Swap Space Requirements).

  3. If no more private heap memory can be allocated, a non-dialog work process can use the SAP extended memory.

Exceptions to this Rule

The allocation sequence described here refers to the standard behavior. You can configure a different behavior for some platforms:

  • AIX

    If parameter ES/TABLES = SHM_SEGS is set, the allocation sequence for non-dialog work processes is the same as for dialog work processes (first EM, then Heap).

    More information: Configuration for AIX

  • Linux

    If parameter em/implementation = map is set, the allocation sequence for non-dialog work processes is the same as for dialog work processes (first EM, then Heap).

    More information: Memory Management on Linux

  • IBM i and Windows have their own allocations sequences. For more information, see the relevant platform documentation.