descriptor: placed views ignore the padding words of the resource description

The title may leave words 1 and 13 of the 56-byte resource description it passes to device methods 0x230/0x238 unwritten, so the same view came in with different bytes there and every one was a new shape: the 2^22 shapes were full after half an hour, after which each placed view was a table entry kept for the run (34.9 million, 16.7 GB after 70 minutes on Series S). Only the named fields are copied now; the padding is zero.

From JMAN730/project-flamingo b1e0cd1d (merged there through PR #620), with its test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit f07e54a2bf2a6d925a7c535c2b5ee24d07b5872c)
This commit is contained in:
Claude authored and regiumlepidi committed 2026-11-27 16:26:18 +01:00
1 parent d12eb1b23d
commit 4eead678b3
2 files changed
+51 -2

No files matched your search

+3
View File
@@ -121,6 +121,9 @@ pub(crate) struct AllocationInfo {
const _: () = assert!(size_of::<HeapProperties>() == 20);
const _: () = assert!(size_of::<HeapDesc>() == 48);
// placed_resource_words copies the two field spans on either side of the padding.
const _: () = assert!(std::mem::offset_of!(ResourceDesc, alignment) == 8);
const _: () = assert!(std::mem::offset_of!(ResourceDesc, flags) == 48);
const _: () = assert!(size_of::<ResourceDesc>() == 56);
const BUFFER: u32 = 1;