diff --git a/kernel/src/lib.rs b/kernel/src/lib.rs index f42a18a..2fb438b 100644 --- a/kernel/src/lib.rs +++ b/kernel/src/lib.rs @@ -517,5 +517,5 @@ pub unsafe fn extism_error_get() -> Pointer { /// Get the position of the allocator, this can be used as an indication of how many bytes are currently in-use #[no_mangle] pub unsafe fn extism_memory_bytes() -> Length { - MemoryRoot::new().length.load(Ordering::Acquire) + MemoryRoot::new().position.load(Ordering::Acquire) } diff --git a/runtime/src/extism-runtime.wasm b/runtime/src/extism-runtime.wasm index 5f3ead8..52d18e5 100755 Binary files a/runtime/src/extism-runtime.wasm and b/runtime/src/extism-runtime.wasm differ