Memory usage by application, class, and method
You can use EsMemoryUseReport to determine the size of the code in an application. For example, to report the memory usage by the CPM application, use the following:
EsMemoryUseReport new
sortByTotal: true;
showMethods: false;
reportMemoryUsedBy: CPM
This example produces output on the Transcript similar to the following:
Application: CPM
Class Storage Methods ByteCodes Literals Total
------------------------------------------------------------------------
Process 10328 73 2384 484 13196
ProcessorScheduler 6640 40 1800 276 8716
Delay 4220 28 1096 220 5536
EsQueue 3400 20 1108 308 4816
UIProcess 1868 9 336 32 2236
Semaphore 1552 7 276 0 1828
EsLongArray 512 0 0 0 512
------------------------------------------------------------------------
Application Total 28520 177 7000 1320 36840
The numbers are in bytes. The columns have the following meanings:
Storage
Indicates the memory used by the class definition itself.
Methods
Contains a count of the number of methods in the class.
ByteCodes
Contains the bytecode size for all the methods in the class.
Literals
Contains the size of the literals for all the methods in the class.
Total
Contains the total of the class. This is the sum of Storage, ByteCodes, and Literals.
EsMemoryUseReport can report more detailed memory usage be setting showMethods: to true. This produces a report with the class information as shown above, but also reports memory statistics for each method in the class.
Last modified date: 01/29/2015