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

Return a status from buddy_safe_free #119

Closed
spaskalev opened this issue Jul 6, 2024 · 1 comment
Closed

Return a status from buddy_safe_free #119

spaskalev opened this issue Jul 6, 2024 · 1 comment
Assignees

Comments

@spaskalev
Copy link
Owner

The intention for buddy_safe_free is to avoid freeing a slot just because it matches in location but doesn't match in size. A call like this is unconditionally a bug in the calling code and calling code should be made aware of it so that it can assert and fail early (as opposed to currently the free doing nothing and leaking memory, therefore delaying the failure until the arena is eventually unable to satisfy a request)

@spaskalev
Copy link
Owner Author

A meaningful status is now returned from buddy_safe_free that can be used to assert and fail quickly.

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