memory: refactor (#1941)

* memory: refactor

* tests: avoid Windows small macro collision

* memory: retain allocation nodes on partial release
This commit is contained in:
nmzik authored and GitHub committed 2026-10-27 21:14:11 +01:00
1 parent 0685bffb2f
commit ffc81377b2
6 files changed
+1435 -1240

No files matched your search

+4 -4
View File
@@ -5686,13 +5686,13 @@ public:
"unmapping the table kept its images pinned");
// A smaller table enters once a second draw acquires it and leaves at the suspend point
// after a frame that did not acquire it. Larger tables stay.
const IR::ImageHeapRequest small{table, table_size / 2u, 32u, 0u, table_size / 64u, &sampled};
const IR::ImageHeapRequest small_request{table, table_size / 2u, 32u, 0u, table_size / 64u, &sampled};
Require(name, "first small draw",
acquire(sampled, idle_table) && !heap.Acquire(small, view) &&
!heap.Acquire(small, view),
acquire(sampled, idle_table) && !heap.Acquire(small_request, view) &&
!heap.Acquire(small_request, view),
"a smaller table entered on its first draw");
draw();
Require(name, "second small draw", heap.Acquire(small, view),
Require(name, "second small draw", heap.Acquire(small_request, view),
"a smaller table was declined on its second draw");
context.RunGarbageCollector();
Require(name, "acquired frame", ImageHeapTestAccess::MemoryCount(heap) == 2u,