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

Use realloc for reallocations #27

Open
daniel-j-h opened this issue Jul 25, 2021 · 0 comments
Open

Use realloc for reallocations #27

daniel-j-h opened this issue Jul 25, 2021 · 0 comments

Comments

@daniel-j-h
Copy link
Member

At the moment when we re-allocate (e.g. array growth) we simply malloc the new chunk of memory, and copy over the old region.

We should look into using realloc for these use cases, and then there's the case where we don't need to move over the old region.

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant