File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ impl<VM: VMBinding> Plan for GenCopy<VM> {
143
143
144
144
/// Return the number of pages available for allocation. Assuming all future allocations goes to nursery.
145
145
fn get_available_pages ( & self ) -> usize {
146
- // super.get_pages_avail () / 2 to reserve pages for copying
146
+ // super.get_available_pages () / 2 to reserve pages for copying
147
147
( self
148
148
. get_total_pages ( )
149
149
. saturating_sub ( self . get_reserved_pages ( ) ) )
Original file line number Diff line number Diff line change @@ -183,9 +183,9 @@ impl<VM: VMBinding> Plan for GenImmix<VM> {
183
183
self . gen . get_used_pages ( ) + self . immix . reserved_pages ( )
184
184
}
185
185
186
- /// Return the number of pages avilable for allocation. Assuming all future allocations goes to nursery.
186
+ /// Return the number of pages available for allocation. Assuming all future allocations goes to nursery.
187
187
fn get_available_pages ( & self ) -> usize {
188
- // super.get_pages_avail () / 2 to reserve pages for copying
188
+ // super.get_available_pages () / 2 to reserve pages for copying
189
189
( self
190
190
. get_total_pages ( )
191
191
. saturating_sub ( self . get_reserved_pages ( ) ) )
Original file line number Diff line number Diff line change @@ -118,6 +118,13 @@ impl<VM: VMBinding> Plan for SemiSpace<VM> {
118
118
self . tospace ( ) . reserved_pages ( ) + self . common . get_used_pages ( )
119
119
}
120
120
121
+ fn get_available_pages ( & self ) -> usize {
122
+ ( self
123
+ . get_total_pages ( )
124
+ . saturating_sub ( self . get_reserved_pages ( ) ) )
125
+ >> 1
126
+ }
127
+
121
128
fn base ( & self ) -> & BasePlan < VM > {
122
129
& self . common . base
123
130
}
You can’t perform that action at this time.
0 commit comments