angr.storage.memory_mixins.paged_memory.pages.refcount_mixin¶
- class angr.storage.memory_mixins.paged_memory.pages.refcount_mixin.RefcountMixin¶
Bases:
MemoryMixinThis mixin adds a locked reference counter and methods to manipulate it, to facilitate copy-on-write optimizations.
- __init__(**kwargs)¶
- acquire_unique()¶
Call this function to return a version of this page which can be used for writing, which may or may not be the same object as before. If you use this you must immediately replace the shared reference you previously had with the new unique copy.
Call this function to indicate that this page has had a reference added to it and must be copied before it can be acquired uniquely again. Creating the object implicitly starts it with one shared reference.
- Return type:
Call this function to indicate that this page has had a shared reference to it released
- Return type: