dlmalloc/
dummy.rs
1use crate::Allocator;
2use core::ptr;
3
4pub struct System {
5 _priv: (),
6}
7
8impl System {
9 pub const fn new() -> System {
10 System { _priv: () }
11 }
12}
13
14unsafe impl Allocator for System {
15 fn alloc(&self, _size: usize) -> (*mut u8, usize, u32) {
16 (ptr::null_mut(), 0, 0)
17 }
18
19 fn remap(&self, _ptr: *mut u8, _oldsize: usize, _newsize: usize, _can_move: bool) -> *mut u8 {
20 ptr::null_mut()
21 }
22
23 fn free_part(&self, _ptr: *mut u8, _oldsize: usize, _newsize: usize) -> bool {
24 false
25 }
26
27 fn free(&self, _ptr: *mut u8, _size: usize) -> bool {
28 false
29 }
30
31 fn can_release_part(&self, _flags: u32) -> bool {
32 false
33 }
34
35 fn allocates_zeros(&self) -> bool {
36 false
37 }
38
39 fn page_size(&self) -> usize {
40 1
41 }
42}