Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Incremental gc #650

Open
wants to merge 2 commits into
base: pharo-12
Choose a base branch
from

Conversation

LucFabresse
Copy link
Collaborator

Start thinking in an incremental GC during a VM dojo

Entry point of the GC in the VM is in SpurMemoryManager>>sufficientSpaceAfterGC:
We added a call to incrementalFullGC and finishIncrementalFullGCWithoutInterruption
Then, we duplicated the GC logic into these two submethods
Note: we must change SpurMemoryManager>>fullGC primitive that is called from the image side

So far we only tried to let the VM execute Pharo code in between the different steps of the mark phase.
VM compilation is ok but there are VM crashes probably because:

  • we should suspend the GC in nicer points (when a given number of objects have been marked for example) instead of what we did
  • newly allocated objects are not marked and will be thrown away
    should we always mark newly allocated objects when the incremental GC is running
  • internal data structure used during the mark phase may be lost
    ...

Unit test to write:

c := OrderedCollection new.
64 timesRepeat: [ c add: (Array new: 1024*1024) pin ].

c := nil.
3 timesRepeat: [ Smalltalk garbageCollect ] 

@LucFabresse LucFabresse changed the title Incremental gc [WIP] Incremental gc Jul 15, 2023
@PalumboN PalumboN added the dojo Things developed on VM Dojos label Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dojo Things developed on VM Dojos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants