The amount of memory an ABAP program consumes depends on the amount of data being processed, which is typically stored in some type of in-memory structure (such as internal tables) that grows dynamically to accommodate the stored data. If the amount of stored data to be loaded into system memory exceeds the size of available storage area, the program terminates, possibly with the runtime errors such as SYSTEM_NO_ROLL or TSV_TNEW_PAGE_ALLOC_FAILED.
Because these errors can arise for a variety of reasons, the root cause may not be immediately obvious .For example, the runtime error TSV_TNEW_PAGE_ALLOC_FAILED occurs when the system can’t increase the size of an internal table due to insufficient available memory. However, this internal table might not be the reason why memory is exhausted. What you need in this situation is a tool to help you determine the real reason that the application has run out of memory.
The ABAP Memory Inspector provides you with an overview of dynamically allocated data (that is, all dynamic in-memory structures) at a particular time, which can be very helpful for diagnosing memory consumption problems, as well as a specialized transaction for analyzing this data.
Using the ABAP Memory Inspector
Analyzing the memory consumption of an application typically consists of two types of scenarios:
Creating the Memory snapshots
There are several ways to create a memory snapshot:
Analyzing and Comparing Memory Snapshots
The ABAP Memory Inspector provides a dedicated transaction for displaying the content of stored memory snapshots.
You start this transaction via S_MEMORY_INSPECTOR, or Memory analysis ->Compare Memory snapshots from the menu bar.
For Example:
Lets say you want to analyze the memory consumption of some program (demo program : ZTEST_MEMORY)
Run the report ZTEST_INDEX
You will get the output as below.
Now enter /hmusa in the command field.
Message will be displayed at the bottom indicating that memory snapshot is created.
To the view the memory snapshot go to the transaction S_MEMORY_INSPECTOR.
Double-click on an entry in the list to open a screenshot and display its contents in the lower part of the screen. You can have up to two snapshots open at one time. Opening a third snapshot automatically closes one of the others based on the difference in creation time. The first opened snapshot is referred to as (t_0);second as (t_1) .To select an open snapshot for display ,use the (t_0) and (t_1) buttons in the application at the top of the screen, or use the Memory Snapshot dropdown list located above the display tree in the lower part of screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |