-
Notifications
You must be signed in to change notification settings - Fork 23
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
Introducing new arena and function that allows an object to be ignored by GC #1141
Conversation
A c++ unittest is under development, but this was already tested using a K definition for a future K PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a work in progress, obviously, but I added some comments about how you need to adjust this in order to complete it. For more information about how to copy the internal structure of the data types that are handled specially, take a look at runtime/collect/collect.cpp
, which has migrate_map
, migrate_mpz
, etc functions which do a bit different of things than you want to do but do, among other things, copy the entire internal structure of the term to a new arena.
Introducing new function allocation `kore_alloc_forever`
Introducing `hook_KREFLECTION_freeze` function
016d077
to
ba69af5
Compare
Closing as the performance gain isn't meaningful. |
This PR introduces a new Arena and a function to bypass the Garbage Collector, as it may have some times when we don't want to waste time deallocating memory that would be reallocated later for the same data.
The
freeze
hook function returns the same block with a different allocation in a new Arena.