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

Improve xmalloc #107

Merged
merged 3 commits into from
Jul 30, 2024
Merged

Improve xmalloc #107

merged 3 commits into from
Jul 30, 2024

Conversation

dag-erling
Copy link
Collaborator

This PR improves the code quality of xmalloc.c somewhat, and addresses the issue raised in #100.

When reallocating, check that the pointer changed before updating the
hash table.  Otherwise, we're just removing then re-adding the same
value.  This frequently happens when the allocation is shrinking, or
only growing by a few bytes.
This fixes the issue described in laurikari#100.
@dag-erling dag-erling merged commit 369cbec into laurikari:master Jul 30, 2024
2 checks passed
@dag-erling dag-erling deleted the des/xmalloc branch July 30, 2024 16:56
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.

1 participant