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

Add a realloc-like function that ignores data #94

Closed
spaskalev opened this issue Nov 22, 2023 · 0 comments · Fixed by #95
Closed

Add a realloc-like function that ignores data #94

spaskalev opened this issue Nov 22, 2023 · 0 comments · Fixed by #95
Assignees

Comments

@spaskalev
Copy link
Owner

Describe the request
When using the allocator to handle dynamic buffers the buffers could be resized on demand and reduced to some fixed default after processing. Doing this with buddy_realloc will incur a memcpy operation if the resulting slots don't have the same address. If the user does not care about the data after processing a resize request could ignore the the data, e.g. a trim-like realloc.

Justification
This will provide a speed improvement for certain uses.

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 a pull request may close this issue.

1 participant