Skip to content

Commit 79cc977

Browse files
committed
update
1 parent a29385a commit 79cc977

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/gem.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ impl GemPool {
3232
Ok(())
3333
}
3434

35+
pub fn mmap(&mut self, handle: u32) -> Option<&mut [u8]> {
36+
self.pool
37+
.get_mut(&handle)
38+
.map(|dvec| unsafe { core::slice::from_raw_parts_mut(dvec.as_ptr(), dvec.len()) })
39+
}
40+
3541
pub fn sync(&mut self, args: &mut RknpuMemSync) {}
3642

3743
pub fn destroy(&mut self, handle: u32) {

0 commit comments

Comments
 (0)