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

hash: lazy-alloc the table in Curl_hash_add() #8132

Merged
merged 1 commit into from
Dec 11, 2021
Merged

Conversation

bagder
Copy link
Member

@bagder bagder commented Dec 10, 2021

This makes Curl_hash_init() infallible which saves error paths.

It also reduces the number of mallocs needed for basic use cases. My test runs doing curl -v localhost/512M -o /dev/null goes from 94 mallocs to 91. With a maximum 132510 bytes down to 132158 (= 352 bytes less).

@bagder bagder added the tidy-up label Dec 10, 2021
This makes Curl_hash_init() infallible which saves error paths.

Closes #8132
@bagder bagder closed this in 254f7bd Dec 11, 2021
@bagder bagder merged commit 254f7bd into master Dec 11, 2021
@bagder bagder deleted the bagder/hash-lazyalloc branch December 11, 2021 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

1 participant