Reclaiming Space in Files II: Deleting Fixed-Length Records for Reclaiming Space Dynamically
In some applications, it is necessary to reclaim space immediately.
To do so, we can:
- Mark deleted records in some special ways
- Find the space that deleted records once occupied so that we can reuse that space when we add records.
- Come up with a way to know immediately if there are empty slots in the file and jump directly to them.
Solution: Use an avail linked list in the form of a stack. Relative Record Numbers (RRNs) play the role of pointers.