@@ -9,7 +9,6 @@ use crate::util::heap::space_descriptor::SpaceDescriptor;
9
9
use crate :: util:: int_array_freelist:: IntArrayFreeList ;
10
10
use crate :: util:: Address ;
11
11
use std:: cell:: UnsafeCell ;
12
- use std:: sync:: atomic:: { AtomicUsize , Ordering } ;
13
12
use std:: sync:: { Mutex , MutexGuard } ;
14
13
15
14
pub struct Map32 {
@@ -27,12 +26,6 @@ pub struct Map32Inner {
27
26
total_available_discontiguous_chunks : usize ,
28
27
finalized : bool ,
29
28
descriptor_map : Vec < SpaceDescriptor > ,
30
-
31
- // TODO: Is this the right place for this field?
32
- // This used to be a global variable. When we remove global states, this needs to be put somewhere.
33
- // Currently I am putting it here, as for where this variable is used, we already have
34
- // references to vm_map - so it is convenient to put it here.
35
- cumulative_committed_pages : AtomicUsize ,
36
29
}
37
30
38
31
unsafe impl Send for Map32 { }
@@ -51,7 +44,6 @@ impl Map32 {
51
44
total_available_discontiguous_chunks : 0 ,
52
45
finalized : false ,
53
46
descriptor_map : vec ! [ SpaceDescriptor :: UNINITIALIZED ; max_chunks] ,
54
- cumulative_committed_pages : AtomicUsize :: new ( 0 ) ,
55
47
} ) ,
56
48
sync : Mutex :: new ( ( ) ) ,
57
49
}
@@ -260,11 +252,6 @@ impl VMMap for Map32 {
260
252
. copied ( )
261
253
. unwrap_or ( SpaceDescriptor :: UNINITIALIZED )
262
254
}
263
-
264
- fn add_to_cumulative_committed_pages ( & self , pages : usize ) {
265
- self . cumulative_committed_pages
266
- . fetch_add ( pages, Ordering :: Relaxed ) ;
267
- }
268
255
}
269
256
270
257
impl Map32 {
0 commit comments