Bug 51053

GemStone/S 64 Bit

3.7.1, 3.7, 3.6.8, 3.6.7, 3.6.6, 3.6.5, 3.6.4, 3.6.3, 3.6.2, 3.6.1, 3.6, 3.5.8, 3.5.7, 3.5.6, 3.5.5, 3.5.4, 3.5.3, 3.5.2, 3.5.1, 3.5, 3.4.5, 3.4.4, 3.4.3, 3.4.2, 3.4.1, 3.4, 3.3.9, 3.3.8, 3.3.7, 3.3.6, 3.3.5, 3.3.4, 3.3.3, 3.3.1, 3.3, 3.2.16, 3.2.15, 3.2.x

GsObjectInventory overstates String bytes used, especially for large strings

GsObjectInventory reports the number of bytes used by Class. For Strings, when the repository contains many large Strings, the number of bytes used was considerably overstated; overages by as much as 8x have been observed.

Workaround

You can find the number of instances using code such as the following.

run
   | sum |
   sum := 0.
   (SystemRepository allInstances: String) do: [:ea | sum := sum + ea _basicSize].
   sum
%


                

Last updated: 8/9/24