Persistence VM?

Ian Piumarta ian.piumarta at inria.fr
Mon Aug 19 18:58:13 UTC 2002


On Mon, 19 Aug 2002 goran.hultgren at bluefish.se wrote:

> "Stephen Pair" <spair at acm.org> wrote:
> [SNIP of a lot of stuff]
> > An analysis of my current working image (which has 623,385 objects in
> > it) indicates that such changes in the object memory layout will result
> > in about an 11% increase the amount of memory needed for this set of
> > objects (about 78% of the objects in my image are small and compact,
> > another 4.4% are large)
> 
> Did I get that right - does your image only grow by 11% with these
> changes?
> Eh, I thought that all that "compact classes stuff" had a larger impact
> than that.

This is with a recent 3.2 image:

    sanity check...
    main.cc: 9 BlockContexts have obsolete frame size 12
    main.cc: 5 BlockContexts have obsolete frame size 32
    main.cc: 6 MethodContexts have obsolete frame size 12 
    main.cc: 2 MethodContexts have obsolete frame size 32 
    ok: 415298 objects in image
      cci  0 = 84832 (20.43%) non-compact
      cci  1 = 52479 (12.64%) CompiledMethod
      cci  2 = 36286 ( 8.74%) Symbol
      cci  3 = 63431 (15.27%) Array
      cci  5 =  6283 ( 1.51%) LargePositiveInteger
      cci  6 = 13304 ( 3.20%) Float
      cci  7 =  3702 ( 0.89%) MethodDictionary
      cci  8 = 39897 ( 9.61%) Association
      cci  9 = 33967 ( 8.18%) Point
      cci 10 = 15605 ( 3.76%) Rectangle
      cci 11 = 63241 (15.23%) String
      cci 13 =   120 ( 0.03%) BlockContext
      cci 14 =   127 ( 0.03%) MethodContext
      cci 16 =  2024 ( 0.49%) Bitmap
      small BlockContext  =   103 (0.02%)
      large BlockContext  =     3 (0.00%)
      small MethodContext =   117 (0.03%)
      large MethodContext =     2 (0.00%)

Unless my math is as bad as my implementation of #removeAll:, with one
extra word for each non-compact header, that makes a total of
	(100 - 20.43) / 100 * 415298 * 4 / 1024 = 1290 kilobytes
saved by using compact headers.

Or, to put it another way, about 7% of the total size of the image
(17698 kilobytes).

Ian




More information about the Squeak-dev mailing list