From 61a0e828b0b3b3b3d384042210dc9d61f820e544 Mon Sep 17 00:00:00 2001 From: Dadoum Date: Sat, 12 Aug 2023 03:06:41 +0200 Subject: [PATCH] Tell the GC to keep malloc'd blocks in place --- source/app.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/app.d b/source/app.d index 8d7bf6e..87c2212 100644 --- a/source/app.d +++ b/source/app.d @@ -437,7 +437,7 @@ class AnisetteService { private ADI makeGarbageCollectedADI(string libraryPath) { extern(C) void* malloc_GC(size_t sz) { - return GC.malloc(sz); + return GC.malloc(sz, GC.BlkAttr.NO_MOVE); } extern(C) void free_GC(void* ptr) {