mirror of
https://github.com/urbit/ares.git
synced 2024-12-22 21:01:29 +03:00
Merge pull request #260 from zorp-corp/ea/dirty-mugging
dirty pma before setting noun metadata
This commit is contained in:
commit
3860ff021d
@ -1,4 +1,5 @@
|
||||
use crate::mem::{word_size_of, NockStack};
|
||||
use crate::persist::{pma_contains,pma_dirty};
|
||||
use sword_macros::tas;
|
||||
use bitvec::prelude::{BitSlice, Lsb0};
|
||||
use either::{Either, Left, Right};
|
||||
@ -984,6 +985,10 @@ impl Allocated {
|
||||
}
|
||||
|
||||
pub unsafe fn set_metadata(self, metadata: u64) {
|
||||
let ptr = self.const_to_raw_pointer_mut();
|
||||
if pma_contains(ptr, 1) {
|
||||
pma_dirty(ptr, 1);
|
||||
}
|
||||
*(self.const_to_raw_pointer_mut()) = metadata;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user