Skip to content

Commit cc7b7e8

Browse files
committed
Applying cargo fmt
1 parent 20c5a26 commit cc7b7e8

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

mmtk/src/gc_trigger.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,14 @@ impl GCTriggerPolicy<JuliaVM> for JuliaGCTrigger {
128128
let heap_size = conversions::pages_to_bytes(reserved_pages_now);
129129

130130
let user_max = self.max_total_memory.load(Ordering::Relaxed) * 80 / 100;
131-
let alloc_diff = self.before_free_heap_size.load(Ordering::Relaxed).saturating_sub(self.old_heap_size.load(Ordering::Relaxed));
132-
let freed_diff = self.before_free_heap_size.load(Ordering::Relaxed).saturating_sub(heap_size);
131+
let alloc_diff = self
132+
.before_free_heap_size
133+
.load(Ordering::Relaxed)
134+
.saturating_sub(self.old_heap_size.load(Ordering::Relaxed));
135+
let freed_diff = self
136+
.before_free_heap_size
137+
.load(Ordering::Relaxed)
138+
.saturating_sub(heap_size);
133139
self.old_heap_size.store(heap_size, Ordering::Relaxed);
134140

135141
// update the heap target only if the user did not force a GC

mmtk/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ pub mod active_plan;
2121
pub mod api;
2222
mod build_info;
2323
pub mod collection;
24-
pub mod gc_trigger;
2524
pub mod conservative;
25+
pub mod gc_trigger;
2626
pub mod object_model;
2727
pub mod reference_glue;
2828
pub mod scanning;

mmtk/src/scanning.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ impl Scanning<JuliaVM> for VMScanning {
8787
// We cannot use `task->start` to skip conservative scanning, as before a task is started, the runtime may evaluate the code and we need to make sure the runtime objects are properly scanned.
8888
// However, without this check, we may timeout in a test that spawns a lot of tasks.
8989
// if unsafe { (*task).start == crate::jl_true } {
90-
crate::conservative::mmtk_conservative_scan_task_stack(task);
91-
crate::conservative::mmtk_conservative_scan_task_registers(task);
90+
crate::conservative::mmtk_conservative_scan_task_stack(task);
91+
crate::conservative::mmtk_conservative_scan_task_registers(task);
9292
// }
9393

9494
if task_is_root {

0 commit comments

Comments
 (0)