uCosminexus Application Server, Maintenance and Migration Guide

[Contents][Glossary][Index][Back][Next]

9.5.1 Overview of the STATIC member statistical functionality

Like the instance statistical functionality, the STATIC member statistical functionality is used to check the memory leak in applications.

The point of difference with the instance statistical functionality is that the instance statistical functionality recursively adds the size of the instances referenced from the non-static fields of the instance retrieved first, while the STATIC member statistical functionality recursively adds the size of the instances referenced from the static fields (static fields of the class) of the instance retrieved first. This enables you to acquire the total size of the instances of the static member for each class. However, apart from the instances retrieved first, both instance statistical functionality and STATIC member statistical functionality check the reference relationship based on the non-static members of the instances.

For details about the difference between the instance statistical functionality and the STATIC member statistical functionality, see 9.5.2(2) Output examples.

To check the cause of a memory leak, execute the STATIC member statistical functionality as follows, before and after the application processing for which you want to check the memory leak, then take the difference between the number of instances and the total size of the instances in points 1 and 3, check the amount of increase in the numbers, and then identify the classes that are causing the memory leak.

  1. Execute the STATIC member statistical functionality.
  2. Execute the application processing for which you want to check the memory leak.
  3. Execute the STATIC member statistical functionality.

Note that because the STATIC member statistical functionality recursively adds the size of the instances referenced by the static fields of each class, you cannot check the total size of only the instances of each class (the size excludes the size of the instances being referenced).

In the STATIC member statistical functionality, investigate for the reference relation from the object that is the base. The base objects are the object those are not investigated in other reference relation and refers the STATIC member of all classes of JavaVM.

When the reference destination objects are investigated, return up to the branch point, and investigate for the reference relation. Investigate for the reference relation until all the objects that are the base are lost.

When using the STATIC member statistical functionality, the following contents are output for instance count and for the total size of instances: