On 8/11/2015 1:41 AM, Dmitry Olshansky wrote:
IMHO enabling D's GC in the frontend is better way to fix leaking in the
CTFE, but there are some issues with that (it segfaults if we enable GC).
Actually I think it's fixed now, just disabled.
It used to have problems with lib*/scan*, but those are in D now, and
most of the allocations from the glue layer are being forwarded to the
GC through rmem.
If anyone wants to try it they just need to add -version=GC to the DMD
build flags and insert this function in root/rmem.d's version(GC) block.
extern (C) void* allocmemory(size_t m_size)