diff --git a/bindings/c/include/kllvm-c/kllvm-c.h b/bindings/c/include/kllvm-c/kllvm-c.h index 8531f68cb..1709635eb 100644 --- a/bindings/c/include/kllvm-c/kllvm-c.h +++ b/bindings/c/include/kllvm-c/kllvm-c.h @@ -159,6 +159,7 @@ void kore_symbol_add_formal_argument(kore_symbol *, kore_sort const *); void kllvm_init(void); void kllvm_free_all_memory(void); +void kllvm_reset_munmap_all_arenas(void); /* Sort-specific functions */ diff --git a/bindings/c/lib.cpp b/bindings/c/lib.cpp index 9613289d9..b69691151 100644 --- a/bindings/c/lib.cpp +++ b/bindings/c/lib.cpp @@ -69,6 +69,7 @@ auto managed(kore_symbol *ptr) { extern "C" { void free_all_kore_mem(); bool hook_BYTES_mutableBytesEnabled(); +void reset_munmap_all_arenas(); } extern "C" { @@ -430,6 +431,10 @@ void kllvm_free_all_memory(void) { free_all_kore_mem(); } +void kllvm_reset_munmap_all_arenas(void) { + reset_munmap_all_arenas(); +} + bool kllvm_mutable_bytes_enabled(void) { return hook_BYTES_mutableBytesEnabled(); } diff --git a/bindings/python/runtime.cpp b/bindings/python/runtime.cpp index 2159f6107..c48c50129 100644 --- a/bindings/python/runtime.cpp +++ b/bindings/python/runtime.cpp @@ -42,6 +42,7 @@ PYBIND11_DECLARE_HOLDER_TYPE(T, raw_ptr, true); extern "C" { void init_static_objects(void); void free_all_kore_mem(void); +void reset_munmap_all_arenas(void); block *take_steps(int64_t, block *); void *construct_initial_configuration(kore_pattern const *initial); } @@ -61,6 +62,7 @@ void bind_runtime(py::module_ &m) { m.def("init_static_objects", init_static_objects); m.def("free_all_gc_memory", free_all_kore_mem); + m.def("reset_munmap_all_arenas", reset_munmap_all_arenas); // This class can't be used directly from Python; the mutability semantics // that we get from the Pybind wrappers make it really easy to break things.