mirror of
https://github.com/urbit/ares.git
synced 2024-11-26 09:57:56 +03:00
Copy output to mmap as bytes
This commit is contained in:
parent
0ff0f2f1f2
commit
c968648d86
@ -37,7 +37,7 @@ fn main() -> io::Result<()> {
|
||||
f_out.set_len((jammed_result.size() << 3) as u64)?;
|
||||
unsafe {
|
||||
let mut out_map = MmapMut::map_mut(&f_out)?;
|
||||
copy_nonoverlapping(jammed_result.data_pointer(), out_map.as_mut_ptr() as *mut u64, jammed_result.size());
|
||||
copy_nonoverlapping(jammed_result.data_pointer() as *mut u8, out_map.as_mut_ptr(), jammed_result.size() << 3);
|
||||
out_map.flush()?;
|
||||
};
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user