Memory Map Analyzer: Application Strings

Hello,

I am trying to understand the footprint of my application.
For that, I am using your MemoryMapAnalyzer tool and I am especially concerned about the “ApplicationStrings” item:

application-strings-memory-map-analyzer

What do the internStrings and sharedarray symbols refer to ?

Thanks,
Alan

Hello Alan,

The symbol _java_internStrings_start references the section that contains all the literal Strings objects (instances of the java.lang.String class).

The symbol _java_sharedarray_start references a char[] that contains the characters of all the literal Strings.
You can reduce the size of this array by enabling the string compaction option in your run configuration. When this option is enabled, the SOAR will merge the content of the Strings that overlap. This feature can increase the build time.
To enable it, open the “JRE” tab of your run configuration, and set the property soar.disableStringCompaction to false in the “VM arguments” field: -Dsoar.disableStringCompaction=false

Regards,
Jerome

1 Like

Hello Jerry,

Thank you for the clarification and the tip !

Best regards,
Alan