Fix mspaces not being protected by locks.

This commit is contained in:
4lDO2
2023-05-06 14:42:33 +02:00
parent 4c7d1a567b
commit b5a620e5f1
+3 -1
View File
@@ -61,5 +61,7 @@ pub unsafe fn free(ptr: *mut c_void) {
}
pub fn new_mspace() -> usize {
unsafe { create_mspace(0, 0) }
let capacity = 0; // don't specify capacity explicitly
let locked = 1;
unsafe { create_mspace(capacity, locked) }
}