Skip to content

chore: Remove the experimental SetFinalizer allocator #4737

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

Merged
merged 1 commit into from
May 11, 2022

Conversation

Marwes
Copy link
Contributor

@Marwes Marwes commented May 11, 2022

Every time we allocate an arrow array we check that we do not exceed the maximum memory limit.
Since this limit check is before the allocation step (and garbage collection) we inevitably
end up in a situation where the limit gets exceeded before the garbage collector has a chance
to run. Worse, go's garbage collector is highly incremental so even when it does run, we can
still end up allocating more than we collect, thereby exceeding the limit.

The only way I can see this allocator working is if the limit is so far above the amount of
memory actually being in use, which would let the garbage collector keep up. However in that case
the memory limit wouldn't really relate to how much memory were actually in use making it rather arbitrary.

Closes #4486

@Marwes Marwes requested a review from a team as a code owner May 11, 2022 11:50
@Marwes Marwes requested review from nathanielc and removed request for a team May 11, 2022 11:50
@Marwes Marwes force-pushed the remove_gc_allocator branch 2 times, most recently from c5fb12e to 5596aaa Compare May 11, 2022 13:59
Every time we allocate an arrow array we check that we do not exceed the maximum memory limit.
Since this limit check is before the allocation step (and garbage collection) we inevitably
end up in a situation where the limit gets exceeded before the garbage collector has a chance
to run. Worse, go's garbage collector is highly incremental so even when it does run, we can
still end up allocating more than we collect, thereby exceeding the limit.

The only way I can see this allocator working is if the limit is so far above the amount of
memory actually being in use, which would let the garbage collector keep up. However in that case
the memory limit wouldn't really relate to how much memory were actually in use making it rather arbitrary.

Closes #4486
@Marwes Marwes force-pushed the remove_gc_allocator branch from 5596aaa to 3a57cc8 Compare May 11, 2022 16:46
@Marwes Marwes merged commit b8e0091 into master May 11, 2022
@Marwes Marwes deleted the remove_gc_allocator branch May 11, 2022 17:06
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.

Proof of concept a memory enforcement solution using finalizers
2 participants