-
Notifications
You must be signed in to change notification settings - Fork 359
ManagedBuffer.capacity is unavailable on OpenBSD. #456
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
Conversation
ManagedBuffer.capacity depends on malloc introspection (e.g., `malloc_size`), which is not available on this platform -- and is thus marked as such. Here, _HashNode.Storage is a ManagedBuffer. Thankfully, the uses of .capacity are fairly limited: one for statistic purposes, which we just completely omit on the platform, and the other, setting a minimum capacity in the header by the buffer's .capacity; the alternative being setting that minimum capacity directly.
|
@swift-ci please test. |
lorentey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I noted a small adjustment we should make on all platforms.
Co-authored-by: Karoy Lorentey <[email protected]>
|
@swift-ci please test. |
|
Applied your suggestion. Please merge on my behalf if there's nothing else, thanks! |
|
@lorentey ping on the merge if that's OK :) |
|
@lorentey ping again on merging, if there's nothing else, thank you! |
|
I'll cherry pick this to the release/1.2 branch, in a separate (bulk) PR |
ManagedBuffer.capacity depends on malloc introspection (e.g.,
malloc_size), which is not available on this platform -- and is thus marked as such.Here, _HashNode.Storage is a ManagedBuffer. Thankfully, the uses of .capacity are fairly limited: one for statistic purposes, which we just completely omit on the platform, and the other, setting a minimum capacity in the header by the buffer's .capacity; the alternative being setting that minimum capacity directly.
Checklist