I'm exploring the v3.3.2 (in a Linux env) subproccess api and am not getting very far. I have a test program:
#include <mimalloc.h>
#include <thread>
int main() {
auto my_subproc = mi_subproc_new();
std::thread t([&]() {
mi_subproc_add_current_thread(my_subproc);
mi_free(mi_malloc(1024));
});
t.join();
mi_subproc_destroy(my_subproc);
return 0;
}
It fails with the assertion:
mimalloc: assertion failed: at "/home/kmills/.conan2/p/b/mimal197d35e7834f1/b/src/src/init.c":446, _mi_subproc_heap_main
assertion: "mi_atomic_load_relaxed(&subproc->heap_main) != NULL"
Is there more to initializing a subprocess than calling mi_subproc_new()?
I'm exploring the v3.3.2 (in a Linux env) subproccess api and am not getting very far. I have a test program:
It fails with the assertion:
Is there more to initializing a subprocess than calling
mi_subproc_new()?