Skip to content

Commit e55f872

Browse files
authored
Flush mutator buffers in destroy_mutator (#1045)
1 parent a058b8c commit e55f872

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/memory_manager.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,15 @@ pub fn bind_mutator<VM: VMBinding>(
121121
mutator
122122
}
123123

124-
/// Report to MMTk that a mutator is no longer needed. A binding should not attempt
125-
/// to use the mutator after this call. MMTk will not attempt to reclaim the memory for the
126-
/// mutator, so a binding should properly reclaim the memory for the mutator after this call.
124+
/// Report to MMTk that a mutator is no longer needed. All mutator state is flushed before it is
125+
/// destroyed. A binding should not attempt to use the mutator after this call. MMTk will not
126+
/// attempt to reclaim the memory for the mutator, so a binding should properly reclaim the memory
127+
/// for the mutator after this call.
127128
///
128129
/// Arguments:
129130
/// * `mutator`: A reference to the mutator to be destroyed.
130131
pub fn destroy_mutator<VM: VMBinding>(mutator: &mut Mutator<VM>) {
132+
mutator.flush();
131133
mutator.on_destroy();
132134
}
133135

0 commit comments

Comments
 (0)