diff --git a/src/c/load.d b/src/c/load.d index 00e486dd4..d615c832a 100644 --- a/src/c/load.d +++ b/src/c/load.d @@ -314,6 +314,13 @@ si_load_binary(cl_object filename, cl_object verbose, cl_object print) cl_object prefix; cl_object output; + /* A full garbage collection enables us to detect unused code + and leave space for the library to be loaded. This is only + required when we use the dlopen wrappers. */ +#ifndef GBC_BOEHM_GENGC + si_gc(Ct); +#endif + /* We need the full pathname */ filename = cl_namestring(cl_truename(filename));