You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
write!(f,"Allocated in space {}",self.get_space_index())
84
+
}
85
+
}
55
86
}
56
87
57
88
/// A byte-map to record all the allocated chunks.
@@ -78,10 +109,17 @@ impl ChunkMap {
78
109
ifself.get(chunk) == state {
79
110
return;
80
111
}
112
+
#[cfg(debug_assertions)]
113
+
{
114
+
let old_state = self.get(chunk);
115
+
if state.is_allocated(){
116
+
assert!(old_state.is_free() || old_state.get_space_index() == state.get_space_index(),"Chunk {:?}: old state {:?}, new state {:?}. Cannot set to new state.", chunk, old_state, state);
0 commit comments