Copy `bytes` into a fresh host-owned allocation and pack (ptr << 32) | len.
(bytes: &[u8])
| 148 | |
| 149 | /// Copy `bytes` into a fresh host-owned allocation and pack (ptr << 32) | len. |
| 150 | unsafe fn report(bytes: &[u8]) -> u64 { |
| 151 | let length = bytes.len(); |
| 152 | let pointer = alloc(length); |
| 153 | |
| 154 | unsafe { |
| 155 | core::ptr::copy_nonoverlapping(bytes.as_ptr(), pointer, length); |
| 156 | } |
| 157 | |
| 158 | ((pointer as u64) << 32) | (length as u64) |
| 159 | } |
| 160 | |
| 161 | // ─── output shapes ─── |
| 162 |
no test coverage detected