8.2 exmemexcludeclass.cfg
exmemexcludeclass.cfg is the configuration file for specifying the classes of objects that are not to be moved to the Explicit heap. This configuration file is known as the explicit memory management functionality exclusion configuration file.
Description
exmemexcludeclass.cfg specifies the classes of objects that are not to be moved to the Explicit heap. Even if GC occurs, objects of the classes specified in this configuration file are not moved to the Explicit heap. The objects are moved to the Tenured area at the time of promotion.
The system provides an explicit memory management functionality exclusion configuration file. This configuration file (sysexmemexcludeclass.cfg) provided by the system is used if the functionality that excludes classes from the explicit memory management functionality is enabled. In addition to the classes specified in the configuration file provided by the system, if you want to add classes to be excluded from the explicit memory management functionality, update the configuration file that is stored in the file path below or create a new configuration file. If you create a new configuration file, specify the file path for the -XX:ExplicitMemoryExcludeClassListFile option.
The path of the configuration file that is provided by the system is as follows:
installation_directory_for_JDK\jre\lib\explicitmemory\sysexmemexcludeclass.cfg
You can disable exclusion for the classes specified in this configuration file by using the configuration file that disables exclusions from the explicit memory management functionality. Specifications in the configuration file that disables exclusions from the explicit memory management functionality have priority over those in this configuration file.
The following explains the specification of each configuration file and the scope of the explicit memory management functionality, by using the package "com.sample" as an example. The package "com.sample" includes the following two classes: ClassA and ClassB. The following are specification examples of the configuration files.
- Specification example of the explicit memory management functionality exclusion configuration file
-
com.sample.*
- Specification example of the configuration file that disables exclusions from the explicit memory management functionality
-
com.sample.ClassB
The specification in the explicit memory management functionality exclusion configuration file includes both ClassA and ClassB. However, because the specification in the configuration file that disables exclusions from the explicit memory management functionality has priority, as shown in the figure below, the explicit memory management functionality is applied to ClassB. Only ClassA is excluded from the explicit memory management functionality.
Syntax
- For types other than the array type:
-
fully_qualified_class_name_of_the_specified_class#comment ... fully_qualified_class_name_of_the_specified_class
- For the array type:
-
"["_repeated_by_the_number_of_dimensions_of_the_array#Lfully_qualified_class_name_of_the_specified_class;
- #
-
For multidimensional arrays, specify [ the same number of times as the number of the dimensions. For example, for a three-dimensional array, specify [[[.
Example for a one-dimensional array of the class aaa.bbb.Myclass:
[Laaa.bbb.Myclass;
The following are the specification rules for this configuration file:
-
Specify one class name per line.
-
Specify no more than 1,024 characters (including null characters and comments) per line. If 1,025 or more characters are specified in a single line, the line cannot be parsed and a warning message appears. Then, the line is ignored and subsequent lines are loaded.
-
You can omit the specification of class names, by specifying package_name.*. Unlike specifying * in the Java language import declaration, if you specify package_name.*, sub-package classes also become targets.
-
Enclose the line in one or more consecutive linefeed characters (\n or 0x0A) or carriage return characters (\r or 0x0D).
-
Single-byte space characters (0x20) and tab characters (\t or 0x09) will be treated as null characters. Note that all null characters in the configuration file are ignored.
-
Prefix each comment with #. All characters from # to end of the line will be treated as the comment.
Storage location
installation_directory_for_JDK\usrconf\exmemexcludeclass.cfg
Examples
This specification example assumes that the package name is "com.sample" and the class structure is configured as shown in the figure below.
- When fully qualified class names are used:
-
The following is a specification example of the explicit memory management functionality exclusion configuration file when fully qualified class names are used.
com.sample.aaa.ClassA com.sample.aaa.ClassC com.sample.ddd.ClassD
In this example, the objects of ClassA, ClassC, and ClassD are to be moved to the Tenured area.
- If the class names are omitted:
-
The following are specification examples of the explicit memory management functionality exclusion configuration file and the configuration file that disables exclusions from the explicit memory management functionality, when class names are omitted.
- Specification example of the explicit memory management functionality exclusion configuration file
-
com.sample.*
- Specification example of the configuration file that disables exclusions from the explicit memory management functionality
-
com.sample.aaa.ClassB com.sample.ddd.ClassE
In this example, according to the specification in the explicit memory management functionality exclusion configuration file, all classes (including the classes in the same package and those in sub-packages) are to be moved to the Tenured area. However, according to the specification in the configuration file that disables exclusions from the explicit memory management functionality, the objects of ClassB and ClassE are to be moved to Explicit memory blocks. As a result, the objects of ClassA, ClassC, and ClassD are moved to the Tenured area.
Regarding whether to specify fully-qualified class names or to omit class names, we recommend that you use the method that allows you to specify fewer items. The two specification examples above have the same results (the objects of ClassA, ClassC, and ClassD are moved to the Tenured area). In such cases, we recommend that you omit class names.