56 lines
11 KiB
XML
56 lines
11 KiB
XML
<?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="263.7004px" preserveAspectRatio="none" style="width:811px;height:263px;" version="1.1" viewBox="0 0 811 263" width="811.5712px" zoomAndPan="magnify"><defs/><g><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="231.1894" x="294.4053" y="11.5848">A5 FLOW — allocate, fragment, coalesce, verify</text><!--MD5=[d0cae5ff9305becd6f502d4fe4f41481]
|
||
entity S1--><rect fill="#EDF6FA" height="53.6024" style="stroke: #2C7794; stroke-width: 1.8061674008810573;" width="108.37" x="7.2247" y="32.316"/><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="45.7562" x="19.2658" y="55.942">01 RESET</text><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="84.2878" x="19.2658" y="70.7021">initial free = 4080</text><!--MD5=[d3395af3100fe8cebf35265100c4415f]
|
||
entity S2--><rect fill="#EDF6FA" height="68.3625" style="stroke: #2C7794; stroke-width: 1.8061674008810573;" width="104.7577" x="224.5668" y="24.9348"/><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="59.0015" x="236.6079" y="48.5608">02 ALLOC A</text><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="80.6755" x="236.6079" y="63.3209">24 byte payload</text><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="63.8179" x="236.6079" y="78.081">first-fit + split</text><!--MD5=[6c7192638421eaf134d201765ac5db29]
|
||
entity S3--><rect fill="#EDF6FA" height="68.3625" style="stroke: #2C7794; stroke-width: 1.8061674008810573;" width="127.6358" x="450.3377" y="24.9348"/><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="74.6549" x="462.3789" y="48.5608">03 ALLOC B / C</text><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="103.5536" x="462.3789" y="63.3209">40 + 16 byte payload</text><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="59.0015" x="462.3789" y="78.081">after = 3952</text><!--MD5=[01b905ebe31ca24275b86a9951c478d0]
|
||
entity S4--><rect fill="#EDF6FA" height="53.6024" style="stroke: #2C7794; stroke-width: 1.8061674008810573;" width="121.6153" x="671.2922" y="32.316"/><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="65.022" x="683.3333" y="55.942">04 FREE A / C</text><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="97.533" x="683.3333" y="70.7021">B remains allocated</text><!--MD5=[099bd2cf1f4f3a6dbf2f1fde6174f38e]
|
||
entity S5--><rect fill="#EDF6FA" height="68.3625" style="stroke: #2C7794; stroke-width: 1.8061674008810573;" width="132.4523" x="665.8737" y="182.4086"/><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="108.37" x="677.9148" y="206.0345">05 E01 FRAGMENTED</text><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="62.6138" x="677.9148" y="220.7946">2 free blocks</text><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="84.2878" x="677.9148" y="235.5547">current > largest</text><!--MD5=[0656c7721b015b9ca8cf2e2c2e8f5aee]
|
||
entity S6--><rect fill="#EDF6FA" height="68.3625" style="stroke: #2C7794; stroke-width: 1.8061674008810573;" width="111.9824" x="465.3891" y="182.4086"/><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="49.3686" x="477.4302" y="206.0345">06 FREE B</text><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="87.9001" x="477.4302" y="220.7946">insert by address</text><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="72.2467" x="477.4302" y="235.5547">join right + left</text><!--MD5=[6ba532df225878998c5769132c3837e2]
|
||
entity S7--><rect fill="#EDF6FA" height="68.3625" style="stroke: #2C7794; stroke-width: 1.8061674008810573;" width="121.6153" x="258.2819" y="182.4086"/><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="97.533" x="270.3231" y="206.0345">07 E02 COALESCED</text><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="57.7974" x="270.3231" y="220.7946">1 free block</text><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="59.0015" x="270.3231" y="235.5547">final = initial</text><!--MD5=[ce611cd767df6ac8a45071985dabb378]
|
||
entity S8--><rect fill="#EDF6FA" height="68.3625" style="stroke: #2C7794; stroke-width: 1.8061674008810573;" width="115.5947" x="8.4288" y="182.4086"/><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="79.4714" x="20.4699" y="206.0345">08 OOM CHECK</text><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="73.4508" x="20.4699" y="220.7946">NULL · hook=1</text><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="91.5125" x="20.4699" y="235.5547">asserts=0 · PASS=1</text><!--MD5=[15cb110786dd224ca6a510a3d2a24e20]
|
||
link S1 to S2--><path d="M115.7994,59.1196 C146.5043,59.1196 184.9515,59.1196 216.5956,59.1196 " fill="none" id="S1->S2" style="stroke: #8095A1; stroke-width: 1.2041116005873715;"/><polygon fill="#8095A1" points="222.2429,59.1196,211.4059,54.3031,216.2223,59.1196,211.4059,63.936,222.2429,59.1196" style="stroke: #8095A1; stroke-width: 1.2041116005873715;"/><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="65.022" x="137.5698" y="51.4386">pvPortMalloc</text><!--MD5=[8eac89d31ced3c9003fbd6a8a005c745]
|
||
link S2 to S3--><path d="M329.5894,59.1196 C362.7266,59.1196 405.9181,59.1196 442.1979,59.1196 " fill="none" id="S2->S3" style="stroke: #8095A1; stroke-width: 1.2041116005873715;"/><polygon fill="#8095A1" points="448.0018,59.1196,437.1648,54.3031,441.9812,59.1196,437.1648,63.936,448.0018,59.1196" style="stroke: #8095A1; stroke-width: 1.2041116005873715;"/><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="77.0631" x="351.2996" y="51.4386">split remainder</text><!--MD5=[82e284a09e4ebade00512bdc77bff32c]
|
||
link S3 to S4--><path d="M578.3709,59.1196 C605.1142,59.1196 636.2044,59.1196 663.4053,59.1196 " fill="none" id="S3->S4" style="stroke: #8095A1; stroke-width: 1.2041116005873715;"/><polygon fill="#8095A1" points="669.1369,59.1196,658.2999,54.3031,663.1163,59.1196,658.2999,63.936,669.1369,59.1196" style="stroke: #8095A1; stroke-width: 1.2041116005873715;"/><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="49.3686" x="599.9486" y="51.4386">vPortFree</text><!--MD5=[0e6b031b378ab8978eaa734a548bdfb6]
|
||
link S4 to S5--><path d="M732.0999,86.2723 C732.0999,110.3906 732.0999,146.6826 732.0999,174.6541 " fill="none" id="S4->S5" style="stroke: #8095A1; stroke-width: 1.2041116005873715;"/><polygon fill="#8095A1" points="732.0999,180.494,736.9163,169.657,732.0999,174.4735,727.2834,169.657,732.0999,180.494" style="stroke: #8095A1; stroke-width: 1.2041116005873715;"/><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="51.7768" x="733.304" y="142.2166">heap stats</text><!--MD5=[3c9aaad44b43c509ca535c241fdd0151]
|
||
reverse link S6 to S5--><path d="M585.5595,216.5812 C610.8338,216.5812 639.8529,216.5812 665.368,216.5812 " fill="none" id="S6<-S5" style="stroke: #8095A1; stroke-width: 1.2041116005873715;"/><polygon fill="#8095A1" points="579.6714,216.5812,590.5084,221.3977,585.6919,216.5812,590.5084,211.7648,579.6714,216.5812" style="stroke: #8095A1; stroke-width: 1.2041116005873715;"/><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="44.5521" x="599.3465" y="208.9003">continue</text><!--MD5=[5f6ea4567bb0950bff1d27387d49b4c2]
|
||
reverse link S7 to S6--><path d="M388.0009,216.5812 C413.0223,216.5812 440.9938,216.5812 464.8352,216.5812 " fill="none" id="S7<-S6" style="stroke: #8095A1; stroke-width: 1.2041116005873715;"/><polygon fill="#8095A1" points="382.1489,216.5812,392.9996,221.3667,388.1694,216.564,392.9721,211.7339,382.1489,216.5812" style="stroke: #8095A1; stroke-width: 1.2041116005873715;"/><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="40.9398" x="402.1733" y="208.9003">coalesce</text><!--MD5=[630b9631f886cf9c8b0d992525b86cf3]
|
||
reverse link S8 to S7--><path d="M132.1994,216.5812 C171.0802,216.5812 219.9551,216.5812 257.9689,216.5812 " fill="none" id="S8<-S7" style="stroke: #8095A1; stroke-width: 1.2041116005873715;"/><polygon fill="#8095A1" points="126.3836,216.5812,137.2206,221.3977,132.4041,216.5812,137.2206,211.7648,126.3836,216.5812" style="stroke: #8095A1; stroke-width: 1.2041116005873715;"/><text fill="#000000" font-family="Monospace" font-size="10.837" lengthAdjust="spacingAndGlyphs" textLength="90.3084" x="145.9985" y="208.9003">oversized request</text><!--MD5=[2e2dc33d46c2ffc454d35cea5ea70934]
|
||
@startuml
|
||
scale 820 width
|
||
top to bottom direction
|
||
skinparam backgroundColor transparent
|
||
skinparam shadowing false
|
||
skinparam defaultFontName Monospace
|
||
skinparam defaultFontSize 9
|
||
skinparam rectangleBorderColor #2c7794
|
||
skinparam rectangleBackgroundColor #edf6fa
|
||
skinparam ArrowColor #8095a1
|
||
title A5 FLOW — allocate, fragment, coalesce, verify
|
||
|
||
rectangle "01 RESET\ninitial free = 4080" as S1
|
||
rectangle "02 ALLOC A\n24 byte payload\nfirst-fit + split" as S2
|
||
rectangle "03 ALLOC B / C\n40 + 16 byte payload\nafter = 3952" as S3
|
||
rectangle "04 FREE A / C\nB remains allocated" as S4
|
||
rectangle "05 E01 FRAGMENTED\n2 free blocks\ncurrent > largest" as S5
|
||
rectangle "06 FREE B\ninsert by address\njoin right + left" as S6
|
||
rectangle "07 E02 COALESCED\n1 free block\nfinal = initial" as S7
|
||
rectangle "08 OOM CHECK\nNULL · hook=1\nasserts=0 · PASS=1" as S8
|
||
|
||
S1 -right-> S2 : pvPortMalloc
|
||
S2 -right-> S3 : split remainder
|
||
S3 -right-> S4 : vPortFree
|
||
S4 -down-> S5 : heap stats
|
||
S5 -left-> S6 : continue
|
||
S6 -left-> S7 : coalesce
|
||
S7 -left-> S8 : oversized request
|
||
@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> |