Epoch-Based Memory Reclamation
Delay freeing retired objects until readers that could have observed them have passed a coordination boundary.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Removing a pointer from a structure starts retirement
Once an object has been unlinked, later operations may no longer find it by normal traversal. An earlier reader can still hold a reference. With epoch-based reclamation, readers announce participation before traversing and leave their protected region when finished. Retired objects are associated with a time or epoch in this protocol instead of being freed immediately.
A grace period closes the lifetime of old observations
Free an object only when all participating operations capable of having observed its old reference are past the relevant epoch under the scheme’s rules. A paused participant can delay reclamation and increase memory use even when new operations keep completing. Announcements and epoch transitions require a memory-order proof. Hazard pointers instead represent particular protected objects. Lock-free progress reminds why allocation and reclamation need evaluation along with the container operations.[1]