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

Delete the page pool allocator #280

Merged
merged 4 commits into from
Feb 10, 2022

Conversation

sadderchris
Copy link
Contributor

@sadderchris sadderchris commented Feb 2, 2022

Issue #, if available: #264

Description of changes:
The page pool allocator leaks memory when used in a threaded context (#264). While we could invest in making this thread-safe by using proper concurrency primitives, it's not clear that the page pool allocator is actually providing any benefit right now.

There are no benchmarks to indicate that it is, and any sane allocator should already be doing something like this behind the scenes (or should be configurable to, in a thread-safe way to boot). I ran some (limited) benchmarks on the ionizer cli, and there wasn't a significant difference in performance without the page pool (the timings were within margin of error, a handful of microseconds at most - not noticeable on the human scale, at least for ionizer's use cases).

This nukes the page pool code. We can perform some more perf tests and benchmarks to determine if it's really worth it to reintroduce something like it in the future.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The page pool allocator leaks memory when used in a threaded context
(amazon-ion#264). While we could invest in making this thread-safe by using proper
concurrency primitives, it's not clear that the page pool allocator
is actually providing any benefit right now.  There are no benchmarks
to indicate that it is, and any sane allocator should already be doing
something like this behind the scenes (in a thread-safe way to boot).

This nukes the page pool code.  We can perform some perf tests and
benchmarks to determine if it's really worth it to reintroduce something
like it in the future.
The IonBinarySymbol.ReaderReadsSymbolValueZeroAsSID test frees the
reader it's using before it reads out the symbol table.
Copy link
Contributor

@tgregg tgregg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you.

@tgregg tgregg merged commit a33386e into amazon-ion:master Feb 10, 2022
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