pr3.6
This commit is contained in:
@@ -1,54 +1,3 @@
|
||||
# PR-3.6 — Implement Sweep Phase (Reclaim Unmarked Objects)
|
||||
|
||||
### Briefing
|
||||
|
||||
After marking, the GC must reclaim unreachable objects. This PR implements the sweep phase.
|
||||
|
||||
### Target
|
||||
|
||||
* Remove or reclaim unmarked objects.
|
||||
* Reset mark bits for the next cycle.
|
||||
|
||||
### Work items
|
||||
|
||||
* Iterate over heap storage.
|
||||
* For each object:
|
||||
|
||||
* If unmarked, reclaim it.
|
||||
* If marked, clear the mark bit.
|
||||
* Ensure handles to reclaimed objects become invalid or reused safely.
|
||||
|
||||
### Acceptance checklist
|
||||
|
||||
* [ ] Unreachable objects are reclaimed.
|
||||
* [ ] Reachable objects remain intact.
|
||||
* [ ] Mark bits are cleared after sweep.
|
||||
* [ ] `cargo test` passes.
|
||||
|
||||
### Tests
|
||||
|
||||
* Add tests:
|
||||
|
||||
* Allocate objects, drop references, run sweep, confirm removal.
|
||||
* Confirm live objects survive.
|
||||
|
||||
### Junie instructions
|
||||
|
||||
**You MAY:**
|
||||
|
||||
* Implement a simple sweep over the heap vector.
|
||||
|
||||
**You MUST NOT:**
|
||||
|
||||
* Implement compaction or handle relocation.
|
||||
* Introduce advanced memory strategies.
|
||||
|
||||
**If unclear:**
|
||||
|
||||
* Ask before choosing handle invalidation strategy.
|
||||
|
||||
---
|
||||
|
||||
# PR-3.7 — Integrate GC Cycle at Safepoint (`FRAME_SYNC`)
|
||||
|
||||
### Briefing
|
||||
|
||||
Reference in New Issue
Block a user