Skip to content

(Partially) make the long-lived allocator optional #8101

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

Closed
wants to merge 3 commits into from

Conversation

jepler
Copy link

@jepler jepler commented Jun 22, 2023

There's still more code in gc_alloc that could be simplified, but this will wait until after the micropython merges because there's also upstream churn.

I tested this on the unix port (only) with LL both enabled and disabled. The mpconfig.mk has to be edited to change the setting, so CI will only test one way.

It's not quite fair to say this "closes" #2687 but it does allow someone who is affected by the difference in identity semantics to turn it off in a custom build.

In practice we may want to consider turning the feature off in our less claustrophobic builds, particularly those with megs of PSRAM. For now, it's left turned on in all builds, because we'd want to measure the impacts before making a decision.

It also frees up about 1kB of code space in trinket_m0 when CIRCUITPY_LONG_LIVED_GC=0 though that's one of those "claustrophobic RAM" boards where long-lived helps the most :-/

jepler added 3 commits June 22, 2023 10:48
"make_obj_long_lived{,_depth}" becomes the sole entry point,
and management of the depth is also centralized to make_obj_long_lived_depth.

This saves 12 bytes on trinket m0 but should not change functionality.
@jepler jepler added this to the 9.0.0 milestone Jun 22, 2023
@jepler jepler closed this Jul 27, 2023
@dhalbert
Copy link
Collaborator

Rendered moot by #8281, which removed long-lived allocations, and so removed objects moving around after creation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants