michael@0: var objs; michael@0: michael@0: function init() michael@0: { michael@0: objs = new Object(); michael@0: var x = new Object(); michael@0: objs.root = x; michael@0: x.a = new Object(); michael@0: x.b = new Object(); michael@0: michael@0: /* michael@0: * Clears out the arena lists. Otherwise all the objects above michael@0: * would be considered to be created during the incremental GC. michael@0: */ michael@0: gc(); michael@0: } michael@0: michael@0: /* michael@0: * Use eval here so that the interpreter frames end up higher on the michael@0: * stack, which avoids them being seen later on by the conservative michael@0: * scanner. michael@0: */ michael@0: eval("init()"); michael@0: michael@0: gcslice(0); michael@0: selectforgc(objs.root); michael@0: gcslice(1); michael@0: delete objs.root.b; michael@0: delete objs.root.a; michael@0: gcslice();