digitalmars.D.learn - Tell GC to use shared memory
Is it possible to modify GC (without rebuilding the compiler), so it uses a given shared memory area instead of heap for allocations?
Oct 07 2015
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.
Oct 07 2015
On Thursday, 8 October 2015 at 05:46:31 UTC, ketmar wrote:On Thursday, 8 October 2015 at 04:38:43 UTC, tcak wrote:Any better solution? Like overriding GC class, etc.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.
Oct 08 2015
GC is chosen at link time simply to satisfy unresolved symbols. You only need to compile your modified GC and link with it, it will be chosen instead of GC from druntime, no need to recompile anything else.
Oct 08 2015
On Thursday, 8 October 2015 at 09:25:36 UTC, tcak wrote:On Thursday, 8 October 2015 at 05:46:31 UTC, ketmar wrote: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-defaultOn Thursday, 8 October 2015 at 04:38:43 UTC, tcak wrote:Any better solution? Like overriding GC class, etc.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.
Oct 11 2015