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

ByteBuffer allocator should use malloc_good_size() on Darwin #2770

Open
weissi opened this issue Jul 7, 2024 · 0 comments
Open

ByteBuffer allocator should use malloc_good_size() on Darwin #2770

weissi opened this issue Jul 7, 2024 · 0 comments

Comments

@weissi
Copy link
Member

weissi commented Jul 7, 2024

Darwin has a useful function malloc_good_size() which returns a good size to malloc. ByteBuffer's allocator should use that instead of just rounding up to the next power of 2.

The malloc_good_size() function rounds size up to a value that the allocator implementation can allocate without adding any padding; it then
returns that rounded-up value.

On Linux, we should also have a better strategy.

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

1 participant