Skip to content

Commit 6f38359

Browse files
authored
Check with is_in_mmtk_spaces instead of is_mapped_address (#123)
Objects in VM spaces are not 'mmapped' by MMTk, so `is_mapepd_address` will return `false` for those. But they are still considered as in MMTk spaces (the VM space). Note that malloc'd objects are not mapped by MMTk, and not in MMTk spaces, so both methods will return `false` for malloc'd objects. However, this seems irrelevant in this scan object code.
1 parent b40af34 commit 6f38359

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mmtk/src/julia_scanning.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use crate::edges::JuliaVMEdge;
22
use crate::edges::OffsetEdge;
33
use crate::julia_types::*;
44
use crate::object_model::mmtk_jl_array_ndims;
5+
use crate::JuliaVM;
56
use crate::JULIA_BUFF_TAG;
67
use crate::UPCALLS;
78
use mmtk::util::{Address, ObjectReference};
@@ -388,7 +389,7 @@ pub fn process_edge<EV: EdgeVisitor<JuliaVMEdge>>(closure: &mut EV, slot: Addres
388389
let simple_edge = SimpleEdge::from_address(slot);
389390
debug_assert!(
390391
simple_edge.load().is_null()
391-
|| mmtk::memory_manager::is_mapped_address(simple_edge.load().to_raw_address()),
392+
|| mmtk::memory_manager::is_in_mmtk_spaces::<JuliaVM>(simple_edge.load()),
392393
"Object {:?} in slot {:?} is not mapped address",
393394
simple_edge.load(),
394395
simple_edge
@@ -442,7 +443,7 @@ pub fn process_offset_edge<EV: EdgeVisitor<JuliaVMEdge>>(
442443
let offset_edge = OffsetEdge::new_with_offset(slot, offset);
443444
debug_assert!(
444445
offset_edge.load().is_null()
445-
|| mmtk::memory_manager::is_mapped_address(offset_edge.load().to_raw_address()),
446+
|| mmtk::memory_manager::is_in_mmtk_spaces::<JuliaVM>(offset_edge.load()),
446447
"Object {:?} in slot {:?} is not mapped address",
447448
offset_edge.load(),
448449
offset_edge

0 commit comments

Comments
 (0)