This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 920 430" font-family="Helvetica, Arial, sans-serif">
|
||||
<rect width="920" height="430" fill="#ffffff"/>
|
||||
<defs>
|
||||
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#555"/></marker>
|
||||
</defs>
|
||||
<text x="460" y="30" font-size="18" font-weight="bold" text-anchor="middle" fill="#222">Logical image: bins tiled with cells</text>
|
||||
|
||||
<g font-size="12" text-anchor="middle">
|
||||
<!-- logical image strip -->
|
||||
<text x="40" y="66" text-anchor="start" fill="#555">Logical image</text>
|
||||
<rect x="40" y="76" width="260" height="40" rx="3" fill="#2f6f8f"/><text x="170" y="100" fill="#fff">bin @ 0, Size 4096</text>
|
||||
<rect x="302" y="76" width="520" height="40" rx="3" fill="#2f6f8f"/><text x="562" y="100" fill="#fff">bin @ 4096, Size 8192 (may span non-adjacent PBNs)</text>
|
||||
<rect x="824" y="76" width="56" height="40" rx="3" fill="#ffffff" stroke="#999" stroke-dasharray="5,4"/><text x="852" y="100" fill="#777">…</text>
|
||||
<line x1="40" y1="118" x2="40" y2="150" stroke="#999" stroke-dasharray="3,3"/>
|
||||
<line x1="300" y1="118" x2="880" y2="150" stroke="#999" stroke-dasharray="3,3"/>
|
||||
|
||||
<!-- bin layout -->
|
||||
<rect x="40" y="152" width="150" height="48" rx="3" fill="#2f6f8f"/><text x="115" y="172" fill="#fff" font-weight="bold">Bin header</text><text x="115" y="189" fill="#fff">32 bytes</text>
|
||||
<rect x="192" y="152" width="150" height="48" rx="3" fill="#3c8d5c"/><text x="267" y="172" fill="#fff" font-weight="bold">Allocated cell</text><text x="267" y="189" fill="#fff" font-family="monospace">Size = −80</text>
|
||||
<rect x="344" y="152" width="90" height="48" rx="3" fill="#3c8d5c"/><text x="389" y="172" fill="#fff" font-weight="bold">Allocated</text><text x="389" y="189" fill="#fff" font-family="monospace">−24</text>
|
||||
<rect x="436" y="152" width="130" height="48" rx="3" fill="#d9d9d9"/><text x="501" y="172" fill="#333" font-weight="bold">Free cell</text><text x="501" y="189" fill="#333" font-family="monospace">+48, zeroed</text>
|
||||
<rect x="568" y="152" width="120" height="48" rx="3" fill="#3c8d5c"/><text x="628" y="172" fill="#fff" font-weight="bold">Allocated</text><text x="628" y="189" fill="#fff" font-family="monospace">−136</text>
|
||||
<rect x="690" y="152" width="190" height="48" rx="3" fill="#d9d9d9"/><text x="785" y="172" fill="#333" font-weight="bold">Free tail</text><text x="785" y="189" fill="#333" font-family="monospace">+N, zeroed</text>
|
||||
<g font-family="monospace" fill="#555" font-size="10">
|
||||
<text x="40" y="214" text-anchor="start">+0</text><text x="192" y="214" text-anchor="start">+32</text><text x="880" y="214" text-anchor="end">+Size</text>
|
||||
</g>
|
||||
<text x="460" y="236" fill="#555">Cells start at bin offset 32, are packed in 8-byte multiples and cover every byte of the bin.</text>
|
||||
|
||||
<!-- bin header detail -->
|
||||
<text x="40" y="276" text-anchor="start" font-weight="bold" fill="#222">Bin header</text>
|
||||
<rect x="40" y="286" width="100" height="40" rx="3" fill="#2f6f8f"/><text x="90" y="303" fill="#fff">Signature</text><text x="90" y="318" fill="#fff" font-family="monospace">"hbin"</text>
|
||||
<rect x="142" y="286" width="100" height="40" rx="3" fill="#2f6f8f"/><text x="192" y="310" fill="#fff">FileOffset</text>
|
||||
<rect x="244" y="286" width="100" height="40" rx="3" fill="#2f6f8f"/><text x="294" y="310" fill="#fff">Size</text>
|
||||
<rect x="346" y="286" width="200" height="40" rx="3" fill="#bbbbbb"/><text x="446" y="310" fill="#333">Reserved (2 × u32)</text>
|
||||
<rect x="548" y="286" width="200" height="40" rx="3" fill="#888888"/><text x="648" y="310" fill="#fff">TimeStamp (u64)</text>
|
||||
<rect x="750" y="286" width="100" height="40" rx="3" fill="#bbbbbb"/><text x="800" y="310" fill="#333">Spare</text>
|
||||
<g font-family="monospace" fill="#555" font-size="10">
|
||||
<text x="40" y="340" text-anchor="start">0</text><text x="142" y="340" text-anchor="start">4</text><text x="244" y="340" text-anchor="start">8</text>
|
||||
<text x="346" y="340" text-anchor="start">12</text><text x="548" y="340" text-anchor="start">20</text><text x="750" y="340" text-anchor="start">28</text><text x="850" y="340" text-anchor="end">32</text>
|
||||
</g>
|
||||
|
||||
<!-- cell detail -->
|
||||
<text x="40" y="374" text-anchor="start" font-weight="bold" fill="#222">Cell</text>
|
||||
<rect x="40" y="384" width="100" height="36" rx="3" fill="#3c8d5c"/><text x="90" y="406" fill="#fff" font-family="monospace">i32 Size</text>
|
||||
<rect x="142" y="384" width="440" height="36" rx="3" fill="#6fae86"/><text x="362" y="406" fill="#fff">Payload: |Size| − 4 bytes (record or raw data)</text>
|
||||
<text x="600" y="400" text-anchor="start" fill="#333">Size < 0: allocated, Size > 0: free</text>
|
||||
<text x="600" y="416" text-anchor="start" fill="#333">Cell index = logical offset of Size</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.8 KiB |
Reference in New Issue
Block a user