Skip to content

Commit 64c6707

Browse files
committed
Lower the async task slab allocation to 1000 bytes.
Due to malloc quanta rounding, 1024-byte async task allocation slabs actually end up allocating 1536 bytes on Darwin. Instead, use 1000-byte slabs. Fixes rdar://81181856.
1 parent aeb36ab commit 64c6707

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

stdlib/public/Concurrency/TaskPrivate.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,7 @@ class alignas(sizeof(void*) * 2) ActiveTaskStatus {
264264
};
265265

266266
/// The size of an allocator slab.
267-
///
268-
/// TODO: find the optimal value by experiment.
269-
static constexpr size_t SlabCapacity = 1024;
267+
static constexpr size_t SlabCapacity = 1000;
270268

271269
using TaskAllocator = StackAllocator<SlabCapacity>;
272270

0 commit comments

Comments
 (0)