Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bindings/c/include/kllvm-c/kllvm-c.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
5 changes: 5 additions & 0 deletions bindings/c/lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down Expand Up @@ -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();
}
Comment on lines +434 to +436

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will also need this in the header file, right?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sorry!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just pushed this fix, thanks for spotting it!


bool kllvm_mutable_bytes_enabled(void) {
return hook_BYTES_mutableBytesEnabled();
}
Expand Down
2 changes: 2 additions & 0 deletions bindings/python/runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ PYBIND11_DECLARE_HOLDER_TYPE(T, raw_ptr<T>, 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);
}
Expand All @@ -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.
Expand Down