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

allocator_api: provide a grow_zeroed implementation #99

Merged
merged 2 commits into from
Feb 18, 2021

Conversation

baloo
Copy link
Contributor

@baloo baloo commented Feb 17, 2021

Fixup #98

The current implementation of grow_zeroed in liballoc allocates a new chunk, copies data over, then deallocates the old chunk.
Bumpalo can use a more memory efficient version of that, and this is an implementation of it.

@baloo
Copy link
Contributor Author

baloo commented Feb 17, 2021

(there is some noise due to rustfmt, which I forgot to run in the initial implementation, let me know if you want me to drop it).

@baloo baloo force-pushed the baloo/allocator/grow_zeroed branch 2 times, most recently from 0ef0606 to 610fe53 Compare February 17, 2021 20:16
Signed-off-by: Arthur Gautier <[email protected]>
@baloo baloo force-pushed the baloo/allocator/grow_zeroed branch from 610fe53 to b1c1b2a Compare February 17, 2021 20:20
Copy link
Owner

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Thanks!

@fitzgen fitzgen merged commit c3e4028 into fitzgen:master Feb 18, 2021
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.

None yet

2 participants