Skip to content

Commit

Permalink
Tell the GC to keep malloc'd blocks in place
Browse files Browse the repository at this point in the history
  • Loading branch information
Dadoum committed Aug 12, 2023
1 parent 5243fad commit 61a0e82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 61a0e82

Please sign in to comment.