xref: /drstd/src/std/sys/unsupported/alloc.rs (revision 86982c5e9b2eaa583327251616ee822c36288824)
1 use crate::std::alloc::{GlobalAlloc, Layout, System};
2 use crate::std::ptr::null_mut;
3 
4 unsafe impl GlobalAlloc for System {
5     #[inline]
6     unsafe fn alloc(&self, _layout: Layout) -> *mut u8 {
7         null_mut()
8     }
9 
10     #[inline]
11     unsafe fn alloc_zeroed(&self, _layout: Layout) -> *mut u8 {
12         null_mut()
13     }
14 
15     #[inline]
16     unsafe fn dealloc(&self, _ptr: *mut u8, _layout: Layout) {}
17 
18     #[inline]
19     unsafe fn realloc(&self, _ptr: *mut u8, _layout: Layout, _new_size: usize) -> *mut u8 {
20         null_mut()
21     }
22 }
23