File tree Expand file tree Collapse file tree 9 files changed +12
-18
lines changed Expand file tree Collapse file tree 9 files changed +12
-18
lines changed Original file line number Diff line number Diff line change 1
1
#![ feature( thread_local) ]
2
2
#![ feature( step_trait) ]
3
3
#![ feature( allocator_api) ]
4
- #![ feature( const_mut_refs) ]
5
4
#![ feature( const_trait_impl) ]
6
- #![ feature( effects) ]
7
5
8
6
extern crate mallockit;
9
7
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ impl EmptyClass {
24
24
}
25
25
}
26
26
27
- const fn group ( block : SuperBlock ) -> usize {
27
+ fn group ( block : SuperBlock ) -> usize {
28
28
let t =
29
29
SuperBlock :: DATA_BYTES >> block. size_class . log_bytes ( ) << block. size_class . log_bytes ( ) ;
30
30
let u = block. used_bytes ( ) ;
Original file line number Diff line number Diff line change @@ -64,15 +64,15 @@ impl SuperBlock {
64
64
self . used_bytes = 0 ;
65
65
}
66
66
67
- pub const fn used_bytes ( self ) -> usize {
67
+ pub fn used_bytes ( self ) -> usize {
68
68
self . used_bytes as _
69
69
}
70
70
71
- pub const fn is_empty ( self ) -> bool {
71
+ pub fn is_empty ( self ) -> bool {
72
72
self . used_bytes == 0
73
73
}
74
74
75
- pub const fn is_full ( self ) -> bool {
75
+ pub fn is_full ( self ) -> bool {
76
76
self . bump_cursor >= Self :: BYTES as u32 && self . head_cell . is_zero ( )
77
77
}
78
78
@@ -92,7 +92,7 @@ impl SuperBlock {
92
92
Some ( cell)
93
93
}
94
94
95
- pub const fn free_cell ( & mut self , cell : Address ) {
95
+ pub fn free_cell ( & mut self , cell : Address ) {
96
96
unsafe {
97
97
cell. store ( self . head_cell ) ;
98
98
}
Original file line number Diff line number Diff line change 1
1
#![ allow( incomplete_features) ]
2
2
#![ feature( const_trait_impl) ]
3
- #![ feature( const_mut_refs) ]
4
3
#![ feature( step_trait) ]
5
4
#![ feature( thread_local) ]
6
5
#![ feature( allocator_api) ]
10
9
#![ feature( adt_const_params) ]
11
10
#![ feature( generic_const_exprs) ]
12
11
#![ feature( effects) ]
13
- #![ feature( asm_const) ]
14
- #![ feature( const_refs_to_cell) ]
15
- #![ feature( const_refs_to_static) ]
16
12
17
13
extern crate mallockit_macros;
18
14
pub extern crate spin;
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ impl<B: MemRegion> BlockPageResource<B> {
108
108
}
109
109
}
110
110
111
- const fn set_next ( b : B , next : Option < B > ) {
111
+ fn set_next ( b : B , next : Option < B > ) {
112
112
let a = b. start ( ) ;
113
113
let next = match next {
114
114
Some ( b) => b. start ( ) ,
@@ -117,7 +117,7 @@ impl<B: MemRegion> BlockPageResource<B> {
117
117
unsafe { a. store ( next) }
118
118
}
119
119
120
- const fn get_next ( b : B ) -> Option < B > {
120
+ fn get_next ( b : B ) -> Option < B > {
121
121
let a = b. start ( ) ;
122
122
let next: Address = unsafe { a. load ( ) } ;
123
123
if next. is_zero ( ) {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ pub static mut MALLOCKIT_MALLOC_ZONE: MallocZone = MallocZone {
20
20
batch_malloc : 0 as _ ,
21
21
// Nullable
22
22
batch_free : 0 as _ ,
23
- introspect : unsafe { addr_of ! ( MALLOCKIT_MALLOC_INTROSPECTION ) } ,
23
+ introspect : addr_of ! ( MALLOCKIT_MALLOC_INTROSPECTION ) ,
24
24
version : 9 ,
25
25
memalign : zone_memalign,
26
26
free_definite_size : 0 as _ ,
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ impl Heap {
24
24
}
25
25
26
26
pub const fn contains ( & self , ptr : Address ) -> bool {
27
- self . start <= ptr && ptr < self . end
27
+ self . start . as_usize ( ) <= ptr. as_usize ( ) && ptr. as_usize ( ) < self . end . as_usize ( )
28
28
}
29
29
30
30
pub const fn start ( & self ) -> Address {
Original file line number Diff line number Diff line change 1
- use std:: panic:: PanicInfo ;
1
+ use std:: panic:: PanicHookInfo ;
2
2
3
3
use crate :: Plan ;
4
4
5
- fn panic_handler ( panic_info : & PanicInfo < ' _ > ) {
5
+ fn panic_handler ( panic_info : & PanicHookInfo < ' _ > ) {
6
6
crate :: println!( "{}" , panic_info) ;
7
7
std:: process:: abort ( ) ;
8
8
}
Original file line number Diff line number Diff line change 1
- nightly-2024-05 -01
1
+ nightly-2024-11 -01
You can’t perform that action at this time.
0 commit comments