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:
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.