1mod alloc_bytes;
2#[cfg(all(unix, feature = "native-lib"))]
3pub mod isolated_alloc;
4#[cfg(not(all(unix, feature = "native-lib")))]
5pub mod isolated_alloc {
6 use std::alloc::Layout;
7
8 #[derive(Debug)]
10 pub struct IsolatedAlloc(!);
11
12 impl IsolatedAlloc {
13 pub fn new() -> Self {
14 unreachable!()
15 }
16
17 pub unsafe fn alloc(&mut self, _layout: Layout) -> *mut u8 {
18 match self.0 {}
19 }
20
21 pub unsafe fn alloc_zeroed(&mut self, _layout: Layout) -> *mut u8 {
22 match self.0 {}
23 }
24
25 pub unsafe fn dealloc(&mut self, _ptr: *mut u8, _layout: Layout) {
26 match self.0 {}
27 }
28 }
29}
30
31pub use self::alloc_bytes::{MiriAllocBytes, MiriAllocParams};