r @$t0=0; $$ Loop to get all foo's .foreach (CurrentFoo {!dumpheap -type George.George2.Foo -short}){ $$ Increment # of Foo's r @$t0 = @$t0+1 .printf "Length:t%dn", poi(${CurrentFoo}+0xc); } .printf "Number of Foo's: %dnnnnnnnnn", @$t0;