MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / publish_executable

Method publish_executable

tests/all/custom_code_memory.rs:14–23  ·  view source on GitHub ↗
(&self, ptr: *const u8, len: usize)

Source from the content-addressed store, hash-verified

12 }
13
14 fn publish_executable(&self, ptr: *const u8, len: usize) -> wasmtime::Result<()> {
15 unsafe {
16 mprotect(
17 ptr as *mut _,
18 len,
19 MprotectFlags::READ | MprotectFlags::EXEC,
20 )?;
21 }
22 Ok(())
23 }
24
25 fn unpublish_executable(&self, ptr: *const u8, len: usize) -> wasmtime::Result<()> {
26 unsafe {

Callers 1

custom_publishMethod · 0.80

Calls 1

OkFunction · 0.85

Tested by

no test coverage detected