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

double size of chunk each time we hit the global allocator for a new chunk #3

Closed
fitzgen opened this issue Dec 13, 2018 · 2 comments
Closed

Comments

@fitzgen
Copy link
Owner

fitzgen commented Dec 13, 2018

Within reason. Should probably have a max chunk size.

@Kerollmops
Copy link
Contributor

Kerollmops commented May 11, 2021

Hey, I think I indeed hit the global allocator, bumpalo was trying to allocate 13GiB and the global allocator (jemalloc) refuses to do that, crashing the program. I could have used the try_ methods, but it is not possible when you use certain crates, like hashbrown (with the bumpalo feature).

It could indeed be a good thing to be able to set the maximum size of a chunk. Maybe a method on the Bump type?

@fitzgen
Copy link
Owner Author

fitzgen commented May 11, 2021

I think it would make sense to try doubling and if that doesn't succeed, then try the current chunk size again, and if that fails, then call the OOM handler.

If you'd like to make this PR, I would be happy to review it.

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