MCPcopy Create free account
hub / github.com/PLSysSec/wave / write_method_1

Function write_method_1

src/tests/memwrite_experiment.rs:43–47  ·  view source on GitHub ↗

Method 1: repeated writes

(ctx: &mut VmCtx, src: &[u8], offset:usize)

Source from the content-addressed store, hash-verified

41
42// Method 1: repeated writes
43fn write_method_1(ctx: &mut VmCtx, src: &[u8], offset:usize){
44 for idx in 0..src.len() {
45 ctx[offset + idx] = src[idx];
46 }
47}
48
49fn write_method_1_u32(ctx: &mut VmCtx, v: u32, offset:usize){
50 let bytes: [u8; 4] = v.to_le_bytes();

Callers

nothing calls this directly

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected