MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / malloc_memory

Method malloc_memory

crates/moonbit/src/async_support.rs:517–524  ·  view source on GitHub ↗
(&mut self, address: &str, length: &str, ty: &Type)

Source from the content-addressed store, hash-verified

515 }
516
517 fn malloc_memory(&mut self, address: &str, length: &str, ty: &Type) -> String {
518 let size = self.world_gen.sizes.size(ty).size_wasm32();
519 let ffi = self
520 .world_gen
521 .pkg_resolver
522 .qualify_package(self.name, FFI_DIR);
523 format!("let {address} = {ffi}malloc({size} * {length});")
524 }
525
526 fn is_list_canonical(&self, _resolve: &Resolve, element: &Type) -> bool {
527 matches!(

Calls 2

qualify_packageMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected