Memory Use
Memory Use Overview
If you choose Goto → Status Display
→ Memory Use, a tabstrip with the
following tabs is displayed:
·
Memory Use –
Total
·
Memory Use –
Ranking List
·
Memory Use –
SCC (strongly connected components)

The Memory
Analysis not only allows you to display the memory use in the Debugger
by choosing Memory Use, but you can also save memory snapshots and
analyze them using the Memory
Inspector.
Memory Use Displays
·
Memory Use –
Total
...
The memory use of the following memory areas is
displayed in bytes (see
Virtual Address Space
of a Work Process):
·
Heap memory
(private memory)
·
Roll
memory
·
Used memory (that
is, the memory occupied by data in the roll or heap memory
·
Allocated memory
(that is, the memory requested in the roll or heap memory
·
Short memory
(memory for storing interim results – for example, from the screen that
is automatically cleared after each dialog step)
·
Paging
memory
·
Memory Use –
Ranking List
Displays a list that contains all used data objects, sorted by bound memory,
and is updated automatically.
·
Memory Use –
SCC
All dynamic objects (internal tables, strings, objects created using
CREATE OBJECT, anonymous data objects created using CREATE DATA) of an internal session make up the nodes of a directed graph, the edges of
which are the corresponding references. To analyze the graph you must be
familiar with the strongly connected components (SCC). An SCC is characterized
by the following: For two elements A and B of an SCC, one path exists in the
object graph from A to B and one from B to A. The path always consists of
several connected edges.
The system displays a ranking list of the memory use of all SCCs in the
current internal session; the entries are sorted either by referenced or by
bound memory. The list only includes SCCs that consist of at least two
elements.
·
Bound Memory
Memory that that is freed up when a complete deletion takes place (for
internal tables, with FREE). The memory of the specified object also includes the memory used by those
objects that only exist as references to the object. For example, if an
internal table exclusively contains references to data objects and these can
be released by the garbage collector after deletion of the table, these
referenced objects also contribute to the bound memory.
·
Referenced
Memory
Memory referenced by the data object (possibly skipping other data objects).
This memory is not necessarily released when the data object is deleted, since
other data objects may still be referencing the memory. The referenced memory
is always larger than or equal to the bound memory.
·
Used Memory
Memory occupied by user data.
·
Allocated
Memory
Memory reserved by the system. The allocated memory is always larger than or
equal to the used memory.
·
Number of
Instances
This column appears in ranking lists only after a grouping and for SCCs. It
specifies that number of instances of a class, a data type, or the elements of
an SCC.
·
Sharing
This column only concerns internal tables and strings. It is selected if
sharing is active for the internal tables or strings after
assignments.
·
SCC Selection
If an internal table, an object, or an anonymous data object is part of an
SCC, a button appears in the right of the column, choosing this button
displays the relevant SCC.
Additional Functions for Ranking
Lists and SCCs
·
Settings
If you choose Change Settings, the system displays a window, in which
you can specify the sorting order (by bound or referenced memory), the update
procedure (automatic or manual), and the number of entries. For the memory use
ranking list, you can also specify the type of data objects whose memory use
is to be displayed. In the ranking list, you can also group objects and
anonymous data objects (created using CREATE DATA) according to their classes or data types. The system adds the memory
requirement of the individual objects and the static memory. This function is
useful if a class or data type has many instances that each have low memory
requirements.
·
Instance List
This function is available for ranking lists only after a grouping. If you
choose the Instance List icon, the system displays all instances of a
class, a data type, or all elements of an SCC.
·
Find References
If you choose the Find References icon, the system lists all references
to an object, anonymous data object, string, internal table, or SCC.
In the case of strings and internal tables for which sharing is active after
assignments, the system displays all variables that are used to address the
common data area. This also includes variables of other ABAP programs in the
same internal session that access strings and internal tables declared using
DATA ... COMMON PART.
·
Save as Local
File
This function is only available for ranking lists. You can use it to save an
excerpt of the ranking list in a local file on the presentation server in
Excel format
Memory Display for Single Objects
and Data Objects
You can activate
and deactivate the memory display for individual objects and data objects by
choosing Settings → Memory Display On/Off. The current
memory values are shown in the display for the individual objects or data
objects.
If you choose the
Find References icon, the system displays all references to an object,
anonymous data object, string, or internal table.
If an internal
table, an object, or an anonymous data object is part of an SCC, a button
appears in the right of the column: choosing this button displays the relevant
SCC.

Sharing is possible for internal tables and
strings. The sharing is displayed in the system by a reference counter. If
this counter has the value 1, sharing is not active for the internal table or
string. In this case, the memory use is added to the node that references this
internal table string – that is, the size of the internal table or
string is contained in the bound memory of the higher-level node.