angr.storage.memory_mixins.paged_memory.pages.refcount_mixin

class angr.storage.memory_mixins.paged_memory.pages.refcount_mixin.RefcountMixin

Bases: MemoryMixin

This 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.

acquire_shared()

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:

None

release_shared()

Call this function to indicate that this page has had a shared reference to it released

Return type:

None