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

Using arenas to replace allocation trickery #9

Closed
jzelinskie opened this issue Jul 26, 2023 · 2 comments
Closed

Using arenas to replace allocation trickery #9

jzelinskie opened this issue Jul 26, 2023 · 2 comments

Comments

@jzelinskie
Copy link

Behind a flag, this proposal for memory arenas has landed in Go.
It's quite possible that leveraging this could eliminate a lot of the low-level nastiness in the z package.

I haven't done a deep dive, but it seems like it could be an improvement.

@manishrjain
Copy link
Contributor

manishrjain commented Jul 27, 2023

Are you talking about the use of jemalloc in z package? We have been using memory arenas since 2017 in Badger 1, so the memory arena isn't a new thing. The benefit of jemalloc is to be able to allocate many small objects and release them independently of each other. A memory arena wouldn't help with that.

In fact, even with arenas, we've seen that jemalloc does a better job of releasing memory than Go does. Let me know if you meant something else.

@manishrjain
Copy link
Contributor

Closing this issue. Feel free to re-open if needed.

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

No branches or pull requests

2 participants