On Thursday, 8 October 2015 at 09:25:36 UTC, tcak wrote:
On Thursday, 8 October 2015 at 05:46:31 UTC, ketmar wrote:
On Thursday, 8 October 2015 at 04:38:43 UTC, tcak wrote:
Is it possible to modify GC (without rebuilding the compiler), so it uses a given shared memory area instead of heap for allocations?

sure. you don't need to rebuild the compiler, only druntime.

Any better solution? Like overriding GC class, etc.

You can install your own GC proxy, see module gc.proxy in druntime, the struct Proxy and functions gc_getProxy, gc_setProxy. No need to recompile druntime.

Here's an example where I install my own GC proxy to do all allocations in my arena:
https://bitbucket.org/infognition/dstuff/src/97cef6d4a0438f9a9f4ff0d18f819262b8a74888/gcarena.d?at=default&fileviewer=file-view-default

Reply via email to