Skip to content

Commit

Permalink
remove unused utilities for deallocating grant memory
Browse files Browse the repository at this point in the history
  • Loading branch information
hudson-ayers committed Sep 11, 2020
1 parent 5daa83c commit d1d977d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
11 changes: 0 additions & 11 deletions kernel/src/grant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,6 @@ impl<T: ?Sized> Owned<T> {
}
}

impl<T: ?Sized> Drop for Owned<T> {
fn drop(&mut self) {
unsafe {
let data = self.data.as_ptr() as *mut u8;
self.appid.kernel.process_map_or((), self.appid, |process| {
process.free(data);
});
}
}
}

impl<T: ?Sized> Deref for Owned<T> {
type Target = T;
fn deref(&self) -> &T {
Expand Down
10 changes: 0 additions & 10 deletions kernel/src/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ impl<L, T> AppPtr<L, T> {
}
}

impl<L, T> Drop for AppPtr<L, T> {
fn drop(&mut self) {
self.process
.kernel
.process_map_or((), self.process, |process| unsafe {
process.free(self.ptr.as_ptr() as *mut u8)
})
}
}

/// Buffer of memory shared from an app to the kernel.
///
/// This is the type created after an app calls the `allow` syscall.
Expand Down

0 comments on commit d1d977d

Please sign in to comment.