Allocating Memory for User Contexts (UNIX)

Use

The memory management system assigns memory to user contexts from the following areas: 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 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.

  1. 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 with the system profile parameter ztta/roll_extension.

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

  2. 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, and spool work processes) with different memory types.

  1. 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 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).

  2. 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).

  • Linux

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

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