Skip to Content
Author's profile photo Former Member

Cracking SAP Memory Management _Part3

Thanks for the response for first two blogs.SAP SCN is a wonderful place to share thoughts

Let me Jump  directly to SAP Extended memory.It is one of the main places where user context is stored.

From the previous blog we know that SAP extended memory is a shared memory.  And it can be used to store the User context.

SAP Extended Memory

Since there are roll in roll outs for different sessions it is convenient to store the user context in Extended memory.

The text which is in bold is explained in the previous blog

What is the Size of the SAP Extended Memory?

The size of the SAP extended memory is allocated when SAP Instance is started up and is defined by em/initial_size_MB

Ztta/roll_extension defines the maximum size of a user context in an extended memory. You know why need this kind of a limit.

SAP Heap memory

The third memory Area where user context can be stored is SAP Heap Memory

Abab/heap_area_dia -SAP heap memory a dialog process can allocate

Abap/heap_area_nondia- SAP Heap memory a non dialogue process can allocate

Abap/heap_area_total-Total SAP Heap memory that can be allocated by all work processes.

Lets do a refresher course and see if all the terms makes sense

We want to look at how memory is allocated during a transaction step.

1.When a transaction starts  ztta/roll_first is allocated which is normally kept to 1 (byte) to reduce the usage of SAP Roll memory.

2.ztta/roll_extension – The remaining part of the user context is stored in Extended Memory up to the limit of this parameter

3.If the extension limit is exceeded the remainder is stored in ztta/roll_area

4.If the Context Continue to grow the work process will go to SAP Heap memory abap/heap_area_dia or non_dia is used depending upon the type of work process .This status is called PRIV mode.


This is a general approach and will vary upon the architecture and the type of operating system. For example in Unix non

Dialog work process uses more of heap memory than shared memory.

SAP EG Memory

As previously noted user context are stored in extended ,roll and heap memory.

However memory areas are required to hold data globally between user contexts.

It is defined by Parameter em/global_area_MB approximately equivalent to 10% of Extended Memory

SAP Paging Memory

It is completely different from Operating system Paging memory

A new user context is created when an ABAP Program calls another program or transaction. The variables are transferred when a new Program is called and is stored in Paging memory. Refer to part1 we have a similar situation like below.




My intention is to introduce some basic terms which is used on  a daily basis and explain it in a simple way. Hope it was useful .you can step on basics and try to read and understand the memory management .

It will be nice to conclude this way

1.Available memory =Physical memory + Swap Space

2.Virtual memory Required

1. ST02 ->Select Detailed Analysis ->Storage




3.100MB for OS


4.Any  Other Program running (memory Occupied)

The Virtual memory Required MUST less than Available  memory. This will be your starting point for memory tuning.

If this blog was useful and interesting please let me know.

The link to previous blogs



Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Reagan Benjamin
      Reagan Benjamin


      This is a general approach and will vary upon the architecture and the type of operating system. For example in Unix non Dialog work process uses more of heap memory than shared memory.

      There are exceptions when it comes to Linux and AIX



      If you set the above parameters on an SAP system running on AIX then the memory allocation of non dialog WP's will be done in the same way like it is done for the dialog WP's



      Author's profile photo Former Member
      Former Member
      Blog Post Author

      THanks Regan for sharing...The idea was to give a basic overview and i let the readers pick from there and explore...many Thanks again for pointers...

      Author's profile photo Former Member
      Former Member

      Cool beans!

      Author's profile photo Himanshu sharma
      Himanshu sharma

      Very informative and useful information Jacob.

      Thanks and Regards,


      Author's profile photo Former Member
      Former Member

      thanx for sharing jacob.. 🙂

      Author's profile photo Former Member
      Former Member

      Many thanks!

      Author's profile photo Arumugam Shanmugam
      Arumugam Shanmugam

      Hi Jacob

      Helpful blog series on the memory mgt. Is the above chart is applicable for dialog process ?. Since in the SAP note 941735 I could find the order is differenf for Non-dialog process

      • Background work processes now use memory close to the process (heap) as the first large memory type. The allocation sequence for "NonDia" work processes is as follows:

                          1. Roll memory (ztta/roll_first),
                          2. Heap memory (abap/heap_area_nondia),
                          3. Roll memory (ztta/roll_area - ztta/roll_first),
                          4. Extended Memory (ztta/roll_extension(_nondia)).
                 In the case of dialog work processes, the allocation sequence remains unchanged from that used in the MAP implementation:
                          1. Roll memory (ztta/roll_first),
                          2. Extended Memory (ztta/roll_extension(_dia)),
                          3. Roll memory (ztta/roll_area - ztta/roll_first),
                          4. Heap memory (abap/heap_area_dia).
                 The allocation sequence can be changed using the RSMEMORY report.



      Author's profile photo Zameer Ahamad
      Zameer Ahamad

      Thanks Jacob.Nice information about the basics of ABAP memory management.

      To know more details of each and every parameter,We have to google the terms which you have mentioned in 3 blogs.For User Context term got lot information apart what you have mentioned here.

      For understanding initial basics concepts about memory management your blogs are enough....Please keep posting more about performance and memory management topics.This topics will always interesting to know more.

      Author's profile photo Shanaka Chandrasekera
      Shanaka Chandrasekera

      Hi Jacob,

      Great article and memory management was explained in simple manner, thanks for sharing.

      Generally when a work process goes to PRIV mode it will eat up the whole memory define from abap/heap_area_dia and no other workprocess can occupy this portion of memory till that workprocess ends or terminate manually (what I understood after reading your three posts)

      If we define a time limit from the parameter rdisp/max_priv_time will a workprocess which goes to PRIV mode will automatically terminate once above time limit exceed?.

      Thanks and best regards,


      Author's profile photo Vinayak Budapanahalli
      Vinayak Budapanahalli

      Literally helpful for novice SAPeans also!!

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thank you Vinayan 🙂