Method 2: vector write
(ctx: &mut VmCtx, src: &[u8], offset:usize)
| 68 | |
| 69 | // Method 2: vector write |
| 70 | fn write_method_2(ctx: &mut VmCtx, src: &[u8], offset:usize){ |
| 71 | (ctx.mem.get(offset)).write(src); |
| 72 | ctx.mem.flush(); |
| 73 | } |
| 74 | |
| 75 | // Method 4: direct pointer manipulation |
| 76 | fn write_method_4_u32(ctx: &mut VmCtx, v: u32, offset:usize){ |