qvm: free to allocator lifecycle
Browse filesFiles changed (10)
- docs/ASSET_PIPELINE_TODO.md+3
- docs/FINDINGS.md+3
- docs/PROVISIONAL_TODO.md+3
- docs/RESEARCH_LEDGER.md+5
- docs/REVERSE_ENGINEERING_TODO.md+3
- docs/research/QVM_FREE_REALLOCATE.mdAdded+7
- docs/research/README.md+3
- docs/research/qvm-free-reallocate.jsonAdded
- scripts/analyze_qvm_free_reallocate.pyAdded+21
- scripts/test_qvm_free_reallocate.pyAdded+21
702 unmodified lines703704705702 unmodified linesResearch progress: RE-676 [report](research/QVM_STRING_RELEASE.md); remaining native/content/runtime/platform scope stays open.702 unmodified lines703704705706707708702 unmodified linesResearch progress: RE-676 [report](research/QVM_STRING_RELEASE.md); remaining native/content/runtime/platform scope stays open.Research progress: RE-677 [report](research/QVM_FREE_REALLOCATE.md); remaining native/content/runtime/platform scope stays open.
1048 unmodified lines1049105010511048 unmodified lines**RE-676 — String resource list detach and bounded byte wipe:** 249639 searches the resource list, detaches a matching header, runs actual36038, wipes length+8 bytes and requests16934 heap release; missing pointers do nothing. [Evidence](research/QVM_STRING_RELEASE.md).1048 unmodified lines1049105010511052105310541048 unmodified lines**RE-676 — String resource list detach and bounded byte wipe:** 249639 searches the resource list, detaches a matching header, runs actual36038, wipes length+8 bytes and requests16934 heap release; missing pointers do nothing. [Evidence](research/QVM_STRING_RELEASE.md).**RE-677 — Actual entity free through allocator reuse timing:** Actual277400 free-time and used state now feed277165 reuse policy; age1000 is eligible, and start+2000 can permit immediate reuse. [Evidence](research/QVM_FREE_REALLOCATE.md).
1028 unmodified lines1029103010311028 unmodified linesResearch progress: RE-676 [report](research/QVM_STRING_RELEASE.md); remaining native/content/runtime/platform scope stays open.1028 unmodified lines1029103010311032103310341028 unmodified linesResearch progress: RE-676 [report](research/QVM_STRING_RELEASE.md); remaining native/content/runtime/platform scope stays open.Research progress: RE-677 [report](research/QVM_FREE_REALLOCATE.md); remaining native/content/runtime/platform scope stays open.
1036 unmodified lines1037103810391036 unmodified lines## 2026-10-21 — RE-676 String resource list detach and bounded byte wipe (separate task commit)249639 searches the resource list, detaches a matching header, runs actual36038, wipes length+8 bytes and requests16934 heap release; missing pointers do nothing. 28 whole-byte fixtures independently verify head/middle/tail/only/missing detach, pointer rewiring, unaligned wipe ends and exact child ordering. Full suite: 1165 tests pass. Report regenerates byte-identically (91672 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.1036 unmodified lines103710381039104010411042104310441036 unmodified lines## 2026-10-21 — RE-676 String resource list detach and bounded byte wipe (separate task commit)249639 searches the resource list, detaches a matching header, runs actual36038, wipes length+8 bytes and requests16934 heap release; missing pointers do nothing. 28 whole-byte fixtures independently verify head/middle/tail/only/missing detach, pointer rewiring, unaligned wipe ends and exact child ordering. Full suite: 1165 tests pass. Report regenerates byte-identically (91672 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.## 2026-10-21 — RE-677 Actual entity free through allocator reuse timing (separate task commit)Actual277400 free-time and used state now feed277165 reuse policy; age1000 is eligible, and start+2000 can permit immediate reuse. 16 full-record compositions independently check free/reuse/extension across protected records, start offsets and ages0/999/1000/1001. Full suite: 1169 tests pass. Report regenerates byte-identically (782381 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
1071 unmodified lines1072107310741071 unmodified lines- [x] RE-676 String resource list detach and bounded byte wipe ([report](research/QVM_STRING_RELEASE.md)).1071 unmodified lines1072107310741075107610771071 unmodified lines- [x] RE-676 String resource list detach and bounded byte wipe ([report](research/QVM_STRING_RELEASE.md)).- [x] RE-677 Actual entity free through allocator reuse timing ([report](research/QVM_FREE_REALLOCATE.md)).
1234567# Actual entity free through allocator reuse timing
RE-677. Reproduce with `python3 scripts/analyze_qvm_free_reallocate.py`; check with `python3 scripts/test_qvm_free_reallocate.py`. The [machine report](qvm-free-reallocate.json) retains source identity and bounded fixtures.
The composition frees actual slot64, advances only the explicit fixture clock and runs the recovered allocator/initializer. An unprotected slot is reusable when free time≤start+2000 or age≥1000; protected slots retain used532 and force extension. Whole selected/unselected880-byte records are independently checked, confirming initializer updates only its known five fields rather than clearing the record again. Native registration occurs only on extension and unlink remains captured. These fixture clocks test the producer/consumer contract, not recovered live server timing or native engine effects.
No original executable/full QVM/native collision/physics/rendering executes. Native responses and legal input domains are supplied or unverified where stated; full runtime/macOS/Linux Rust/Bevy/Solari gameplay remains open.629 unmodified lines630631632629 unmodified lines[RE-676: String resource list detach and bounded byte wipe](QVM_STRING_RELEASE.md). Reproduce with `python3 scripts/analyze_qvm_string_release.py`; check with `python3 scripts/test_qvm_string_release.py`.629 unmodified lines630631632633634635629 unmodified lines[RE-676: String resource list detach and bounded byte wipe](QVM_STRING_RELEASE.md). Reproduce with `python3 scripts/analyze_qvm_string_release.py`; check with `python3 scripts/test_qvm_string_release.py`.[RE-677: Actual entity free through allocator reuse timing](QVM_FREE_REALLOCATE.md). Reproduce with `python3 scripts/analyze_qvm_free_reallocate.py`; check with `python3 scripts/test_qvm_free_reallocate.py`.
123456789101112131415161718192021#!/usr/bin/env python3"""Actual277400 free state consumed by actual277165 allocator timing policy."""import itertoolsfrom pathlib import Pathfrom qvm_research_support import sourcefrom analyze_qvm_allocated_event import setupfrom analyze_qvm_entity_free import release,FIELDSfrom analyze_qvm_entity_allocate import allocatefrom analyze_qvm_entity_init import POOL,STRIDEfrom analyze_qvm_temp_event import recordfrom analyze_qvm import write_json
def main(): q,raw,h,ins=source();rows=[];freed=POOL+64*STRIDE;extension=freed+STRIDE for protected,start,gap in itertools.product([0,1],[0,3000],[0,999,1000,1001]): m=setup(raw,h,True);m[34992532]=5000;m[34992544]=start;m[freed+532]=1;m[freed+548]=protected;m[freed+528]=0 for o in FIELDS:m[freed+o]=0 extra_before=record(m,extension);m,freer=release(ins,m,freed);m[34992532]=5000+gap;m,alloc=allocate(ins,m) rows.append({'protected':protected,'start':start,'gap':gap,'free':freer,'allocation':alloc,'extension_initial':extra_before,'final_freed_record':record(m,freed),'final_extension_record':record(m,extension)}) write_json(Path('docs/research/qvm-free-reallocate.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Actual277400 then277165/277125 on explicit clocks/pool. Unlink/registration requests captured, zero fill modeled. No original heap resources or server schedule/native world effects.'})if __name__=='__main__':main()123456789101112131415161718192021import json,unittestfrom pathlib import PathFREE=34091368+64*880class FreeReallocateTests(unittest.TestCase): @classmethod def setUpClass(cls):cls.rows=json.loads(Path('docs/research/qvm-free-reallocate.json').read_text())['probes'] def test_independent_free_age_and_start_policy(self): self.assertEqual(len(self.rows),16) for p in self.rows: reuse=not p['protected'] and (5000<=p['start']+2000 or p['gap']>=1000);a=p['allocation'];self.assertEqual(a['selected'],FREE if reuse else FREE+880);self.assertEqual(a['count'],65 if reuse else 66) def test_full_selected_record_and_unselected_preservation(self): for p in self.rows: reused=p['allocation']['selected']==FREE;expected=(p['free']['final_record'] if reused else p['extension_initial']).copy();expected.update({'0':64 if reused else 65,'532':1,'536':97243,'540':(-1068468807)&0xffffffff,'512':1023});self.assertEqual(p['allocation']['record'],expected) self.assertEqual(p['final_freed_record'],expected if reused else p['free']['final_record']);self.assertEqual(p['final_extension_record'],p['extension_initial'] if reused else expected) def test_exact_age_boundary_and_protected_paths(self): for p in self.rows: if p['start']==0 and not p['protected']:self.assertEqual(p['allocation']['selected']==FREE,p['gap']>=1000) if p['protected']:self.assertEqual(p['allocation']['selected'],FREE+880) def test_native_registration_only_for_extension(self): for p in self.rows:self.assertEqual(len(p['allocation']['registrations']),int(p['allocation']['selected']!=FREE));self.assertEqual(p['free']['requests'][0]['target'],-32)if __name__=='__main__':unittest.main()docs/ASSET_PIPELINE_TODO.md+3
docs/FINDINGS.md+3
docs/PROVISIONAL_TODO.md+3
docs/RESEARCH_LEDGER.md+5
docs/REVERSE_ENGINEERING_TODO.md+3
docs/research/QVM_FREE_REALLOCATE.mdAdded+7
docs/research/README.md+3
docs/research/qvm-free-reallocate.jsonAdded
scripts/analyze_qvm_free_reallocate.pyAdded+21
scripts/test_qvm_free_reallocate.pyAdded+21