std.experimental.allocator.GCAllocator always allocates blocks that are marked as containing pointers for GC scanning. However, for something like an i/o buffer, there is no reason to scan this for pointers, since it's raw data from a file.
There isn't an API that allows this, so I'm wondering if the GCAllocator should accept a template flag that dictates the NO_SCAN requirement?
I did this for my own purposes for iopipe: https://github.com/schveiguy/iopipe/blob/6a8c10d2858f92978d72c55eecc7ad55fcc207e2/source/iopipe/buffer.d#L18
Comment #1 by robert.schadek — 2024-12-01T16:40:17Z