Bug 23321 – Add ability to set NO_SCAN flag for GCAllocator

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-09-03T02:30:29Z
Last change time
2024-12-01T16:40:17Z
Assigned to
No Owner
Creator
Steven Schveighoffer
Moved to GitHub: phobos#10498 →

Comments

Comment #0 by schveiguy — 2022-09-03T02:30:29Z
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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10498 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB