-
Notifications
You must be signed in to change notification settings - Fork 287
Optionally move objects around in memory to prepare Pyston for a moving collector. #889
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
Conversation
|
Ok I think I addressed everything except making ChunkedStack global. |
(Those new commits will be squashed with the other ones by the way). I was afraid using templates for
|
If the callers can see the casting-template, I think they'll end up inlining it and we'll generate the exact same code. |
925e2bf
to
2d1c177
Compare
They tends to time out or just make the test suite run for longer. They definitely times out when running a prototype moving gc.
It's easier to tell the two constants apart if they are different.
Moving gcs will need this to update pointers. There should not be any extra dereference, it will just happen on the other side of the function. Use templates to avoid direct (void**) casts -- make sure we're always passing an pointer of the form T**.
- Refactor the stack logic into a separate data structure ChunkedStack, keep the push function that deals with marking as functionality specific to a subclass of ChunkedStack (no virtual, just reuse code). - Add an additional (disabled) phase that maps out the reference graph reachable objects after the sweep phase. Prepare moving all objects in the small heap. Also, rename TraceStack to TraversalWorklist because the fact that we're using a stack is an implementation detail.
This will reallocate all objects in the small heap and update all references that were pointing to this object. This is not functional yet, there are still references that we are not tracking at other points in the program, so it's still gated behind the MOVING_GC flag.
Optionally move objects around in memory to prepare Pyston for a moving collector.
Just under the wire :) Thanks for all your work this summer rudi! |
Enable the code that does the moving by changing
MOVING_GC
ingc.h