feat: add interactive FC01 heap4 card

This commit is contained in:
user
2026-07-20 12:04:14 +02:00
parent bd34c7ec1e
commit 48eccb5e24
39 changed files with 7744 additions and 210 deletions
+71
View File
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="620.2921px" preserveAspectRatio="none" style="width:295px;height:620px;" version="1.1" viewBox="0 0 295 620" width="295.9262px" zoomAndPan="magnify"><defs/><g><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="202.1522" x="49.1929" y="8.2167">A2 STRUCTURE — in-band metadata and address order</text><!--MD5=[9827fb78ff6e3f59cfadf959dc26af7c]
class HEADER--><rect fill="#EDF6FA" height="54.7579" id="HEADER" style="stroke: #2C7794; stroke-width: 1.1529592799906587;" width="81.4758" x="29.5926" y="16.4642"/><ellipse cx="39.5849" cy="27.2252" fill="#ADD1B2" rx="6.9178" ry="6.9178" style="stroke: #2C7794; stroke-width: 0.7686395199937726;"/><path d="M40.5698,29.7593 Q40.3055,29.8914 40.0173,29.9515 Q39.7291,30.0235 39.4048,30.0235 Q38.2758,30.0235 37.6753,29.2789 Q37.0869,28.5343 37.0869,27.1171 Q37.0869,25.6999 37.6753,24.9553 Q38.2758,24.2107 39.4048,24.2107 Q39.7291,24.2107 40.0173,24.2828 Q40.3175,24.3428 40.5698,24.4749 L40.5698,25.7119 Q40.2815,25.4477 40.0053,25.3276 Q39.7411,25.2075 39.4648,25.2075 Q38.8523,25.2075 38.5401,25.6879 Q38.2278,26.1683 38.2278,27.1171 Q38.2278,28.0659 38.5401,28.5463 Q38.8523,29.0267 39.4648,29.0267 Q39.7411,29.0267 40.0053,28.9066 Q40.2815,28.7865 40.5698,28.5223 L40.5698,29.7593 Z "/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="59.9539" x="48.8086" y="30.2075">01 Block header</text><line style="stroke: #2C7794; stroke-width: 1.1529592799906587;" x1="30.3613" x2="110.2998" y1="37.9862" y2="37.9862"/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="68.4089" x="34.2045" y="49.2775">next : BlockLink_t*</text><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="42.2752" x="34.2045" y="59.7463">size : size_t</text><line style="stroke: #2C7794; stroke-width: 1.1529592799906587;" x1="30.3613" x2="110.2998" y1="65.073" y2="65.073"/><!--MD5=[40d637119be40bcfdc4ce848efbdda9e]
class ALLOC--><rect fill="#EDF6FA" height="65.2267" id="ALLOC" style="stroke: #2C7794; stroke-width: 1.1529592799906587;" width="114.5273" x="13.0669" y="128.8701"/><ellipse cx="39.6618" cy="139.631" fill="#ADD1B2" rx="6.9178" ry="6.9178" style="stroke: #2C7794; stroke-width: 0.7686395199937726;"/><path d="M40.6466,142.1652 Q40.3824,142.2973 40.0942,142.3573 Q39.8059,142.4294 39.4816,142.4294 Q38.3527,142.4294 37.7522,141.6848 Q37.1637,140.9401 37.1637,139.523 Q37.1637,138.1058 37.7522,137.3612 Q38.3527,136.6165 39.4816,136.6165 Q39.8059,136.6165 40.0942,136.6886 Q40.3944,136.7486 40.6466,136.8808 L40.6466,138.1178 Q40.3584,137.8536 40.0821,137.7335 Q39.8179,137.6134 39.5417,137.6134 Q38.9292,137.6134 38.6169,138.0938 Q38.3047,138.5742 38.3047,139.523 Q38.3047,140.4717 38.6169,140.9521 Q38.9292,141.4325 39.5417,141.4325 Q39.8179,141.4325 40.0821,141.3124 Q40.3584,141.1923 40.6466,140.9281 L40.6466,142.1652 Z "/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="56.1107" x="52.5749" y="142.6134">Allocated block</text><line style="stroke: #2C7794; stroke-width: 1.1529592799906587;" x1="13.8355" x2="126.8255" y1="150.392" y2="150.392"/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="105.3036" x="17.6787" y="161.6833">02 header + 13 byte request</text><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="88.3935" x="17.6787" y="172.1522">aligned total = 32 bytes</text><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="104.535" x="17.6787" y="182.621">payload begins after header</text><line style="stroke: #2C7794; stroke-width: 1.1529592799906587;" x1="13.8355" x2="126.8255" y1="187.9477" y2="187.9477"/><!--MD5=[71c2adef9be32489055f250a531e7c6f]
class REM--><rect fill="#EDF6FA" height="54.7579" id="REM" style="stroke: #2C7794; stroke-width: 1.1529592799906587;" width="89.9308" x="25.3651" y="251.7448"/><ellipse cx="35.3574" cy="262.5058" fill="#ADD1B2" rx="6.9178" ry="6.9178" style="stroke: #2C7794; stroke-width: 0.7686395199937726;"/><path d="M36.3422,265.0399 Q36.078,265.172 35.7898,265.232 Q35.5015,265.3041 35.1773,265.3041 Q34.0483,265.3041 33.4478,264.5595 Q32.8593,263.8148 32.8593,262.3977 Q32.8593,260.9805 33.4478,260.2359 Q34.0483,259.4913 35.1773,259.4913 Q35.5015,259.4913 35.7898,259.5633 Q36.09,259.6234 36.3422,259.7555 L36.3422,260.9925 Q36.054,260.7283 35.7778,260.6082 Q35.5135,260.4881 35.2373,260.4881 Q34.6248,260.4881 34.3125,260.9685 Q34.0003,261.4489 34.0003,262.3977 Q34.0003,263.3465 34.3125,263.8269 Q34.6248,264.3073 35.2373,264.3073 Q35.5135,264.3073 35.7778,264.1872 Q36.054,264.0671 36.3422,263.8028 L36.3422,265.0399 Z "/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="68.4089" x="44.5811" y="265.4881">03 Free remainder</text><line style="stroke: #2C7794; stroke-width: 1.1529592799906587;" x1="26.1337" x2="114.5273" y1="273.2667" y2="273.2667"/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="43.8125" x="29.9769" y="284.558">own header</text><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="59.9539" x="29.9769" y="295.0269">size = 224 bytes</text><line style="stroke: #2C7794; stroke-width: 1.1529592799906587;" x1="26.1337" x2="114.5273" y1="300.3535" y2="300.3535"/><!--MD5=[b0a0edd67d9eafaaa5639bbe6382adce]
class LIST--><rect fill="#EDF6FA" height="44.289" id="LIST" style="stroke: #2C7794; stroke-width: 1.1529592799906587;" width="124.5196" x="8.0707" y="364.1506"/><ellipse cx="18.063" cy="374.9116" fill="#ADD1B2" rx="6.9178" ry="6.9178" style="stroke: #2C7794; stroke-width: 0.7686395199937726;"/><path d="M19.0478,377.4457 Q18.7836,377.5778 18.4954,377.6379 Q18.2071,377.7099 17.8829,377.7099 Q16.7539,377.7099 16.1534,376.9653 Q15.565,376.2207 15.565,374.8035 Q15.565,373.3863 16.1534,372.6417 Q16.7539,371.8971 17.8829,371.8971 Q18.2071,371.8971 18.4954,371.9692 Q18.7956,372.0292 19.0478,372.1613 L19.0478,373.3983 Q18.7596,373.1341 18.4834,373.014 Q18.2192,372.8939 17.9429,372.8939 Q17.3304,372.8939 17.0182,373.3743 Q16.7059,373.8547 16.7059,374.8035 Q16.7059,375.7523 17.0182,376.2327 Q17.3304,376.7131 17.9429,376.7131 Q18.2192,376.7131 18.4834,376.593 Q18.7596,376.4729 19.0478,376.2087 L19.0478,377.4457 Z "/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="102.9977" x="27.2867" y="377.8939">04 Address-ordered free list</text><line style="stroke: #2C7794; stroke-width: 1.1529592799906587;" x1="8.8394" x2="131.8217" y1="385.6726" y2="385.6726"/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="107.6095" x="12.6826" y="396.9639">previous &lt; inserted &lt; current</text><line style="stroke: #2C7794; stroke-width: 1.1529592799906587;" x1="8.8394" x2="131.8217" y1="402.2905" y2="402.2905"/><!--MD5=[490fcd32b6546c9bc615869efabd094a]
class RIGHT--><rect fill="#EDF6FA" height="44.289" id="RIGHT" style="stroke: #2C7794; stroke-width: 1.1529592799906587;" width="114.5273" x="13.0669" y="466.0876"/><ellipse cx="33.0899" cy="476.8486" fill="#ADD1B2" rx="6.9178" ry="6.9178" style="stroke: #2C7794; stroke-width: 0.7686395199937726;"/><path d="M34.0748,479.3827 Q33.8105,479.5148 33.5223,479.5748 Q33.2341,479.6469 32.9098,479.6469 Q31.7808,479.6469 31.1803,478.9023 Q30.5919,478.1577 30.5919,476.7405 Q30.5919,475.3233 31.1803,474.5787 Q31.7808,473.8341 32.9098,473.8341 Q33.2341,473.8341 33.5223,473.9061 Q33.8225,473.9662 34.0748,474.0983 L34.0748,475.3353 Q33.7865,475.0711 33.5103,474.951 Q33.2461,474.8309 32.9698,474.8309 Q32.3573,474.8309 32.0451,475.3113 Q31.7328,475.7917 31.7328,476.7405 Q31.7328,477.6893 32.0451,478.1697 Q32.3573,478.6501 32.9698,478.6501 Q33.2461,478.6501 33.5103,478.53 Q33.7865,478.4099 34.0748,478.1457 L34.0748,479.3827 Z "/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="70.7148" x="44.5427" y="479.8309">05 Right neighbour</text><line style="stroke: #2C7794; stroke-width: 1.1529592799906587;" x1="13.8355" x2="126.8255" y1="487.6095" y2="487.6095"/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="105.3036" x="17.6787" y="498.9008">block + block.size == current</text><line style="stroke: #2C7794; stroke-width: 1.1529592799906587;" x1="13.8355" x2="126.8255" y1="504.2275" y2="504.2275"/><!--MD5=[007d3a1820cefd008c8dbdad7e6fdec6]
class LEFT--><rect fill="#EDF6FA" height="44.289" id="LEFT" style="stroke: #2C7794; stroke-width: 1.1529592799906587;" width="131.4374" x="4.6118" y="568.0246"/><ellipse cx="34.7809" cy="578.7855" fill="#ADD1B2" rx="6.9178" ry="6.9178" style="stroke: #2C7794; stroke-width: 0.7686395199937726;"/><path d="M35.7658,581.3197 Q35.5015,581.4518 35.2133,581.5118 Q34.9251,581.5839 34.6008,581.5839 Q33.4718,581.5839 32.8713,580.8393 Q32.2829,580.0946 32.2829,578.6775 Q32.2829,577.2603 32.8713,576.5157 Q33.4718,575.771 34.6008,575.771 Q34.9251,575.771 35.2133,575.8431 Q35.5135,575.9032 35.7658,576.0353 L35.7658,577.2723 Q35.4775,577.0081 35.2013,576.888 Q34.9371,576.7679 34.6608,576.7679 Q34.0483,576.7679 33.7361,577.2483 Q33.4238,577.7287 33.4238,578.6775 Q33.4238,579.6262 33.7361,580.1066 Q34.0483,580.587 34.6608,580.587 Q34.9371,580.587 35.2013,580.4669 Q35.4775,580.3468 35.7658,580.0826 L35.7658,581.3197 Z "/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="65.3344" x="48.2321" y="581.7679">06 Left neighbour</text><line style="stroke: #2C7794; stroke-width: 1.1529592799906587;" x1="5.3805" x2="135.2806" y1="589.5465" y2="589.5465"/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="122.2137" x="9.2237" y="600.8378">previous + previous.size == block</text><line style="stroke: #2C7794; stroke-width: 1.1529592799906587;" x1="5.3805" x2="135.2806" y1="606.1645" y2="606.1645"/><path d="M159.877,371.9831 L159.877,383.2206 L132.7671,386.2952 L159.877,389.3697 L159.877,400.6072 A0,0 0 0 0 159.877,400.6072 L286.7025,400.6072 A0,0 0 0 0 286.7025,400.6072 L286.7025,379.6695 L279.0161,371.9831 L159.877,371.9831 A0,0 0 0 0 159.877,371.9831 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 0.7686395199937726;"/><path d="M279.0161,371.9831 L279.0161,379.6695 L286.7025,379.6695 L279.0161,371.9831 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 0.7686395199937726;"/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="110.6841" x="164.4889" y="384.043">Ordering makes both physical</text><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="96.0799" x="164.4889" y="394.5119">neighbours locally visible.</text><!--MD5=[fc2657b7de304bb41a5d36ac60748945]
reverse link HEADER to ALLOC--><path d="M70.3305,82.6749 C70.3305,97.5173 70.3305,114.3505 70.3305,128.5626 " fill="none" id="HEADER&lt;-ALLOC" style="stroke: #8095A1; stroke-width: 0.7686395199937726;"/><polygon fill="#8095A1" points="70.3305,72.7056,67.256,77.3174,70.3305,81.9293,73.4051,77.3174,70.3305,72.7056" style="stroke: #8095A1; stroke-width: 0.7686395199937726;"/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="65.3344" x="71.0992" y="103.2667">precedes payload</text><!--MD5=[bb73b5a7e21afff1a1d0c43dcbd5d11a]
link ALLOC to REM--><path d="M70.3305,194.2813 C70.3305,210.5842 70.3305,230.3382 70.3305,246.6026 " fill="none" id="ALLOC-&gt;REM" style="stroke: #8095A1; stroke-width: 0.7686395199937726;"/><polygon fill="#8095A1" points="70.3305,250.3689,73.4051,243.4512,70.3305,246.5257,67.256,243.4512,70.3305,250.3689" style="stroke: #8095A1; stroke-width: 0.7686395199937726;"/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="70.7148" x="71.0992" y="226.1414">split preserves 256</text><!--MD5=[32aec76f28e14f88b0d74d9f592c80fb]
link REM to LIST--><path d="M70.3305,306.8178 C70.3305,322.8901 70.3305,343.1975 70.3305,359.1622 " fill="none" id="REM-&gt;LIST" style="stroke: #8095A1; stroke-width: 0.7686395199937726;"/><polygon fill="#8095A1" points="70.3305,362.8055,73.4051,355.8878,70.3305,358.9623,67.256,355.8878,70.3305,362.8055" style="stroke: #8095A1; stroke-width: 0.7686395199937726;"/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="63.7971" x="71.0992" y="338.5473">insert by address</text><!--MD5=[6bd3103bbaa36e7d502940b82c286473]
link LIST to RIGHT--><path d="M70.3305,408.6011 C70.3305,423.9508 70.3305,444.681 70.3305,461.0377 " fill="none" id="LIST-&gt;RIGHT" style="stroke: #8095A1; stroke-width: 0.7686395199937726;"/><polygon fill="#8095A1" points="70.3305,464.7963,73.4051,457.8786,70.3305,460.9531,67.256,457.8786,70.3305,464.7963" style="stroke: #8095A1; stroke-width: 0.7686395199937726;"/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="30.7456" x="71.0992" y="440.4842">join first</text><!--MD5=[f41c07ebada6943a8deaf240fd528885]
link RIGHT to LEFT--><path d="M70.3305,510.538 C70.3305,525.8878 70.3305,546.618 70.3305,562.9746 " fill="none" id="RIGHT-&gt;LEFT" style="stroke: #8095A1; stroke-width: 0.7686395199937726;"/><polygon fill="#8095A1" points="70.3305,566.7333,73.4051,559.8155,70.3305,562.8901,67.256,559.8155,70.3305,566.7333" style="stroke: #8095A1; stroke-width: 0.7686395199937726;"/><text fill="#000000" font-family="Monospace" font-size="7.6864" lengthAdjust="spacingAndGlyphs" textLength="47.6557" x="71.0992" y="542.4212">then join left</text><!--MD5=[83344144544ae5f259c61315a4ceaf0d]
@startuml
scale 620 height
top to bottom direction
skinparam backgroundColor transparent
skinparam shadowing false
skinparam defaultFontName Monospace
skinparam defaultFontSize 10
skinparam classBorderColor #2c7794
skinparam classBackgroundColor #edf6fa
skinparam ArrowColor #8095a1
title A2 STRUCTURE — in-band metadata and address order
class "01 Block header" as HEADER {
next : BlockLink_t*
size : size_t
}
class "Allocated block" as ALLOC {
02 header + 13 byte request
aligned total = 32 bytes
payload begins after header
}
class "03 Free remainder" as REM {
own header
size = 224 bytes
}
HEADER *- - ALLOC : precedes payload
ALLOC -down-> REM : split preserves 256
class "04 Address-ordered free list" as LIST {
previous < inserted < current
}
class "05 Right neighbour" as RIGHT {
block + block.size == current
}
class "06 Left neighbour" as LEFT {
previous + previous.size == block
}
REM -down-> LIST : insert by address
LIST -down-> RIGHT : join first
RIGHT -down-> LEFT : then join left
note right of LIST
Ordering makes both physical
neighbours locally visible.
end note
@enduml
PlantUML version 1.2020.02(Sun Mar 01 11:22:07 CET 2020)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Java Version: 25.0.4-ea+4-1-Debian
Operating System: Linux
Default Encoding: UTF-8
Language: en
Country: null
--></g></svg>

After

Width:  |  Height:  |  Size: 15 KiB