Skip to content

Commit b169cdb

Browse files
authored
Update to mmtk-core PR #161 (#28)
1 parent 02be196 commit b169cdb

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

mmtk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ lazy_static = "1.1"
2121
# - change branch
2222
# - change repo name
2323
# But other changes including adding/removing whitespaces in commented lines may break the CI.
24-
mmtk = { git = "ssh://[email protected]/mmtk/mmtk-core.git", rev = "b9dc15173c881861644f8f48d7abf2e1fc6b4fc7" }
24+
mmtk = { git = "ssh://[email protected]/mmtk/mmtk-core.git", rev = "aa518f13e04441ef6f344c88fe7f7464e6a3a73a" }
2525
# Uncomment the following to build locally
2626
# mmtk = { path = "../repos/mmtk-core" }
2727

mmtk/src/api.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use libc::{c_char, c_void};
33
use std::ffi::CStr;
44

55
use mmtk::memory_manager;
6-
use mmtk::Allocator;
6+
use mmtk::AllocationSemantics;
77
use mmtk::util::{ObjectReference, OpaquePointer, Address};
88
use mmtk::{Plan, MMTK};
99
use mmtk::util::constants::LOG_BYTES_IN_PAGE;
@@ -52,12 +52,12 @@ pub extern "C" fn flush_mutator(mutator: *mut Mutator<SelectedPlan<OpenJDK>>) {
5252

5353
#[no_mangle]
5454
pub extern "C" fn alloc(mutator: *mut Mutator<SelectedPlan<OpenJDK>>, size: usize,
55-
align: usize, offset: isize, allocator: Allocator) -> Address {
55+
align: usize, offset: isize, allocator: AllocationSemantics) -> Address {
5656
memory_manager::alloc::<OpenJDK>(unsafe { &mut *mutator }, size, align, offset, allocator)
5757
}
5858

5959
#[no_mangle]
60-
pub extern "C" fn get_allocator_mapping(allocator: Allocator) -> AllocatorSelector {
60+
pub extern "C" fn get_allocator_mapping(allocator: AllocationSemantics) -> AllocatorSelector {
6161
memory_manager::get_allocator_mapping(&SINGLETON, allocator)
6262
}
6363

@@ -95,7 +95,7 @@ pub extern "C" fn alloc_slow_largeobject(allocator: *mut c_void, size: usize, al
9595

9696
#[no_mangle]
9797
pub extern "C" fn post_alloc(mutator: *mut Mutator<SelectedPlan<OpenJDK>>, refer: ObjectReference, type_refer: ObjectReference,
98-
bytes: usize, allocator: Allocator) {
98+
bytes: usize, allocator: AllocationSemantics) {
9999
memory_manager::post_alloc::<OpenJDK>(unsafe { &mut *mutator }, refer, type_refer, bytes, allocator)
100100
}
101101

mmtk/src/object_model.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
use mmtk::vm::*;
3-
use mmtk::Allocator;
3+
use mmtk::AllocationSemantics;
44
use mmtk::util::{Address, ObjectReference};
55
use mmtk::util::OpaquePointer;
66
use std::sync::atomic::{AtomicU8, AtomicUsize, Ordering};
@@ -21,7 +21,7 @@ impl ObjectModel<OpenJDK> for VMObjectModel {
2121
}
2222
}
2323
#[inline]
24-
fn copy(from: ObjectReference, allocator: Allocator, copy_context: &mut impl CopyContext) -> ObjectReference {
24+
fn copy(from: ObjectReference, allocator: AllocationSemantics, copy_context: &mut impl CopyContext) -> ObjectReference {
2525
let bytes = unsafe { ((*UPCALLS).get_object_size)(from) };
2626
let dst = copy_context.alloc_copy(from, bytes, ::std::mem::size_of::<usize>(), 0, allocator);
2727
// Copy

0 commit comments

Comments
 (0)