Commit 1c9d8d2
committed
[concurrency] Avoid capacity in Deque on OpenBSD.
Deque creates a new ManagedBuffer when growing the underlying storage for
its elements. It sets the capacity in the header object, however it
initializes that field with ManagedBuffer.capacity.
ManagedBuffer.capacity is marked unavailable on OpenBSD because
ManagedBuffer unavoidably depends on malloc introspection which is
unavailable on this platform.
Obviously, we could mark the whole class as unavailable, but we don't
need to do anything so drastic since it appears though that Deque doesn't
unavoidably need this introspection. Therefore, on OpenBSD, just use
`minimumCapacity` when creating a new ManagedBuffer when growing and
moving elements.1 parent 069e51d commit 1c9d8d2
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
233 | 238 | | |
234 | 239 | | |
235 | 240 | | |
| |||
0 commit comments