[Pharo-project] Incremental garbage collection
Hi! The garbage collection offered by the Pharo VM has two divisions. One for young objects, and another for old objects. I was wondering when a young object become old? I start to have a pretty good idea for human beings, but I am not so sure for Pharo objects. Is it when the object survives its first garbage collection? Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Mon, May 10, 2010 at 5:33 PM, Alexandre Bergel <alexandre.bergel@inria.fr
wrote:
Hi!
The garbage collection offered by the Pharo VM has two divisions. One for young objects, and another for old objects. I was wondering when a young object become old? I start to have a pretty good idea for human beings, but I am not so sure for Pharo objects. Is it when the object survives its first garbage collection?
Hi Alexandre. I am still newbie with VM stuff, but as I understood, yes, young objects become old when they survive to thei first incremental GC. Notice the INCREMENTAL GC and not FULL GC. But I may be wrong...so I will let other to answer properly ;) I have just looked at the code and I am not sure where that movement happens :( Cheers Mariano
Cheers, Alexandre
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On 10 May 2010 18:33, Alexandre Bergel <alexandre.bergel@inria.fr> wrote:
Hi!
The garbage collection offered by the Pharo VM has two divisions. One for young objects, and another for old objects. I was wondering when a young object become old? I start to have a pretty good idea for human beings, but I am not so sure for Pharo objects. Is it when the object survives its first garbage collection?
I'd say, whenever VM decides to change a youngStart pointer. Its quite sophisticated, and having a lot of quirks & preconditions. But after compaction (either incremental or full), it usually picks a free memory region which will serve as a space for newly created objects. After that, obviously, all objects, which survived GC treated as old ones.
Cheers, Alexandre
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel  http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
http://www.smalltalkconsulting.com/papers/GCPaper/GCTalk%202001.htm see slides 46 & 47 You need to have a tenure event, or a full GC to move the youngStart pointer past all previously allocated objects, thus promoting a previously allocated object from new space into old space. There is btw a primitive I added many years back primitiveForceTenure SystemDictionary>>forceTenure Understanding when and why you would want to use it is another question... On 2010-05-10, at 9:02 AM, Igor Stasenko wrote:
On 10 May 2010 18:33, Alexandre Bergel <alexandre.bergel@inria.fr> wrote:
Hi!
The garbage collection offered by the Pharo VM has two divisions. One for young objects, and another for old objects. I was wondering when a young object become old? I start to have a pretty good idea for human beings, but I am not so sure for Pharo objects. Is it when the object survives its first garbage collection?
I'd say, whenever VM decides to change a youngStart pointer. Its quite sophisticated, and having a lot of quirks & preconditions. But after compaction (either incremental or full), it usually picks a free memory region which will serve as a space for newly created objects. After that, obviously, all objects, which survived GC treated as old ones.
Cheers, Alexandre
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- =========================================================================== John M. McIntosh <johnmci@smalltalkconsulting.com> Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
Thanks John, your slides are really good. Alexandre On 10 May 2010, at 12:41, John M McIntosh wrote:
http://www.smalltalkconsulting.com/papers/GCPaper/GCTalk%202001.htm
see slides 46 & 47
You need to have a tenure event, or a full GC to move the youngStart pointer past all previously allocated objects, thus promoting a previously allocated object from new space into old space.
There is btw a primitive I added many years back primitiveForceTenure
SystemDictionary>>forceTenure
Understanding when and why you would want to use it is another question...
On 2010-05-10, at 9:02 AM, Igor Stasenko wrote:
On 10 May 2010 18:33, Alexandre Bergel <alexandre.bergel@inria.fr> wrote:
Hi!
The garbage collection offered by the Pharo VM has two divisions. One for young objects, and another for old objects. I was wondering when a young object become old? I start to have a pretty good idea for human beings, but I am not so sure for Pharo objects. Is it when the object survives its first garbage collection?
I'd say, whenever VM decides to change a youngStart pointer. Its quite sophisticated, and having a lot of quirks & preconditions. But after compaction (either incremental or full), it usually picks a free memory region which will serve as a space for newly created objects. After that, obviously, all objects, which survived GC treated as old ones.
Cheers, Alexandre
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- =========================================================================== John M. McIntosh <johnmci@smalltalkconsulting.com> Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (4)
-
Alexandre Bergel -
Igor Stasenko -
John M McIntosh -
Mariano Martinez Peck