[Issue 23321] New: Add ability to set NO_SCAN flag for GCAllocator
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 3 02:30:29 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23321
Issue ID: 23321
Summary: Add ability to set NO_SCAN flag for GCAllocator
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: schveiguy at gmail.com
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
--
More information about the Digitalmars-d-bugs
mailing list