ngrc version works?

This commit is contained in:
2024-04-03 20:55:49 -07:00
parent fab5a230f1
commit 5f2fc7cb34
8 changed files with 119 additions and 9 deletions

View File

@@ -91,7 +91,14 @@ impl RuntimeFunctions {
/// one; both to reduce the chance that they deviate, and to reduce overall
/// maintenance burden.
pub fn register_jit_implementations(builder: &mut JITBuilder) {
let allocation_pointer = unsafe {
std::alloc::alloc_zeroed(
std::alloc::Layout::from_size_align(1024 * 1024, 1024 * 1024)
.expect("reasonable layout is reasonable"),
)
};
builder.symbol("print", runtime_print as *const u8);
builder.symbol("__global_allocation_pointer__", allocation_pointer);
}
}