CL_ABAP_MEMORY_UTILITIES - Utility for ABAP Memory Management
Addresses (Business Address Services) PERFORM Short ReferenceThis documentation is copyright by SAP AG.
Functionality
This class provides methods that return information about current memory consumption while a program or transaction is running.
- WRITE_MEMORY_CONSUMPTION_FILE
Generates a memory snapshot, which can be evaluated using the program BC_MEMORY_INSPECTOR.
- GET_MEMORY_SIZE_OF_OBJECT
Calculates the size of a dynamically created object - that is, a string, table rump (internal table),instance of a class (object), or anonymous data object. You specify these objects using a referencein the IMPORTING parameter OBJECT. The method calculates both the bound and referenced memory. (Boundmemory is memory released to the minimum possible extent when the object is deleted; referenced memoryis memory released to the maximum possible extent when the object is deleted.) Since more memory isgenerally allocated to internal tables and strings than is used at a given point in time, the valuesof bound and referenced memory are then split into Allocatedand Used. The dynamically created objects form a directed graph,which contains the dynamically created objects as nodes and the references to them as edges. When thebound memory is calculated, the size of a referred node (supernode points to subnode) of the size of the supernode is calculated whenever the subnode is a table rump (internal table) or string with reference counters.
If the object is in a non-trivial strongly connected component of the object graph, the size of thisconnected component is also output. The parameter IS_PART_OF_NON_TRIVIAL_SZK specifies whether or not these values are filled.
If there is no longer sufficient memory available to execute the object graph, a second attempt is made,whereby less memory is used, but where the method call outputs only the values BOUND_ALLOC_SIZE and BOUND_USED_SIZE . In this case, LOW_MEM is set to 'X'.
If there is still not enough memory to run this restricted mode, the parameters BOUND_ALLOC_SIZE, BOUND_USED_SIZE, REFERENCED_SIZE_ALLOC, and REFERENCED_SIZE_USED are set to -1.
If the object is in shared memory, the parameter IS_IN_SHARED_MEMORY is set to 'X'.
- DO_GARBAGE_COLLECTION
Calls the Garbage Collector. The Garbage Collector releases non-referenced (and thus no longer needed)memory. The Garbage Collector is called automatically at specific intervals. In many cases however, you may wish to call the Garbage Collector explicitly, rather than wait for the next automatic call.
Relationships
Example
Notes
Further information
BAL_S_LOG - Application Log: Log header data General Data in Customer Master
This documentation is copyright by SAP AG.
Length: 2748 Date: 20120526 Time: 082138 triton ( 158 ms )






