Re: Automatic garbage collection is enabled!
talksmall <[email protected]> Sat, 1 Nov 2008 16:39:00 -0700 (PDT)
| Newsgroups | gmane.comp.lang.smalltalk.strongtalk |
|---|---|
| Message-ID | <d214529e-b78c-41e7-ba9b-ebb462747c1f@v16g2000prc.googlegroups.com> |
Dave, Anything that the VM allocates internally uses the old logic and I haven't touched the behaviour for block and context allocation. I've added some parameters to the allocate methods on the various klass subclasses to indicate whether a scavenge is allowed when newgen is full (and therefore, implicitly, expansion of oldgen if it, too, is full). If not the methods just return NULL, which the primitive catch and return a marked symbol to invoke the failure blocks. The two extra flags have default values that equate to the previous behaviour, so the only place that I made changes was in the new primitives and the amendment to the optimised allocation primitives used by the compiler. Since the name of the replacement allocation primitive for non-indexables matches the same pattern as the old name, it gets replaced by the PrimInliner in just the same way. I had to patch the primitiveNew[0-9] code so that they return a marked symbol rather than calling scavenge, but that seems to work just fine. Regards, Steve On Nov 1, 8:21=A0pm, "David Griswold" <[email protected]> wrote: > That's great! =A0Something that has been needed for a long time. > Question: how does this work for things like block closures that are not > allocated explicitly, and thus have no fail block in the image code? > -Dave > > On Sat, Nov 1, 2008 at 12:44 PM, talksmall <[email protected]>w= rote: > > > > > I've just checked in a change (r154) to add automatic garbage > > collection to the VM. Actually the code to automate garbage collection > > is Smalltalk code invoked in the fail blocks of the various allocation > > primitives. The change to the VM just allows the primitive to fail > > when insufficient space is available to fulfil the allocation. > > > To use this code you will need to download and replace your image and > > source directory with the version found in the strongtalk-autogc- > > r154.tgz file on the Downloads tab of the project website. > > > I've updated the relevant issue with some brief details of the > > changes. > > > Regards, talksmall --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "= Strongtalk-general" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to strongtalk-general+unsubscrib= [email protected] For more options, visit this group at http://groups.google.com/group/strong= talk-general?hl=3Den -~----------~----~----~----~------~----~------~--~---