Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Creating Objects and Values →  Shared Objects →  Shared Objects - Objects 

Shared Objects - Memory Bottlenecks

The shared memory of an application server is a limited resource. The ABAP runtime environment uses it to store programs, program data, buffers etc. Explicit ABAP programming can access either data clusters in cross-transaction application buffers or shared objects in the shared objects memory.

The maximum amount of shared memory that can be occupied by the different users is defined statically using profile parameters. Transaction ST02 shows the current utilization of the shared memory and the related profile parameters.

If the amount of memory allocated to the shared objects memory (by the profile parameter abap/shared_objects_size_MB) is exceeded when shared objects are used, a handleable exception of class CX_SHM_OUT_OF_MEMORY is raised. This exception can occur in different situations:

  • When shared objects are created or changed in the shared memory

For this reason, we recommend that the exception CX_SHM_OUT_OF_MEMORY each time that the shared objects memory is read. The easiest way to do this is when all accesses to shared objects (in an ideal situation, these only occur within one wrapper class) also take place in only one single TRY control structure, in which this exception is handled. If an exclusive lock on the area still exists when the exception is handled (this can be identified using the method GET_LOCK_KIND of the area handle), it should be removed using DETACH_ROLLBACK.

Other versions: 7.31 | 7.40 | 7.54


Note

To handle the exception CX_SHM_OUT_OF_MEMORY, a suitable fallback strategy should be implemented, for example a strategy to create the required objects in the internal session and copy the previous content from the shared memory to these objects.