内存布局图更新到09-21最新:任务栈预算含实测峰值与判定,RAM双区/Flash布局同步

This commit is contained in:
2026-09-21 05:10:01 +08:00
parent 80fc7ffaa5
commit 96855f6b6b
4 changed files with 266 additions and 194 deletions
+42 -26
View File
@@ -1,4 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 740 340" width="740" height="340" style="font-family:Consolas,'Courier New',monospace; font-size:12px; background:#fff">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 880 440" width="880" height="440" style="font-family:Consolas,'Courier New',monospace; font-size:12px; background:#fff">
<defs>
<style>
.title { font-size:14px; font-weight:bold; }
@@ -7,29 +7,45 @@
.bar-seg { stroke:#fff; stroke-width:0.5; }
</style>
</defs>
<text x="370.0" y="24" text-anchor="middle" class="title">FreeRTOS 任务栈分配 (48KB 堆池)</text>
<text x="180" y="54" class="legend-text" fill="#555">分配栈大小 (Bytes)</text>
<text x="176" y="75.0" text-anchor="end" dominant-baseline="central" class="label" fill="#333">defaultTask</text>
<rect class="bar-seg" x="180" y="60" width="65.0" height="30" fill="#2196F3" rx="3"/>
<text x="212.5" y="75.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#fff">2048B (2.0KB)</text>
<text x="176" y="109.0" text-anchor="end" dominant-baseline="central" class="label" fill="#333">netTask</text>
<rect class="bar-seg" x="180" y="94" width="130.0" height="30" fill="#2196F3" rx="3"/>
<text x="245.0" y="109.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#fff">4096B (4.0KB)</text>
<text x="176" y="143.0" text-anchor="end" dominant-baseline="central" class="label" fill="#333">ftpTask</text>
<rect class="bar-seg" x="180" y="128" width="130.0" height="30" fill="#2196F3" rx="3"/>
<text x="245.0" y="143.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#fff">4096B (4.0KB)</text>
<text x="176" y="177.0" text-anchor="end" dominant-baseline="central" class="label" fill="#333">testTask</text>
<rect class="bar-seg" x="180" y="162" width="130.0" height="30" fill="#2196F3" rx="3"/>
<text x="245.0" y="177.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#fff">4096B (4.0KB)</text>
<text x="176" y="211.0" text-anchor="end" dominant-baseline="central" class="label" fill="#333">uiTask</text>
<rect class="bar-seg" x="180" y="196" width="520.0" height="30" fill="#2196F3" rx="3"/>
<text x="440.0" y="211.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#fff">16384B (16.0KB)</text>
<text x="176" y="245.0" text-anchor="end" dominant-baseline="central" class="label" fill="#333">timeSyncTask</text>
<rect class="bar-seg" x="180" y="230" width="65.0" height="30" fill="#2196F3" rx="3"/>
<text x="212.5" y="245.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#fff">2048B (2.0KB)</text>
<text x="180" y="268" class="label" fill="#555">堆总量: 49,152B (48KB) 任务栈合计: ~34304B (33.5KB) 空闲: ~13736B (13.4KB)</text>
<rect x="180" y="286" width="10" height="10" fill="#2196F3" rx="2"/>
<text x="194" y="294" class="legend-text" fill="#333">Normal 优先级</text>
<rect x="310" y="286" width="10" height="10" fill="#FF9800" rx="2"/>
<text x="324" y="294" class="legend-text" fill="#333">BelowNormal 优先级</text>
<text x="440.0" y="22" text-anchor="middle" class="title">FreeRTOS 任务栈预算(48KB 堆,2026-09-21 已迁 CCM)</text>
<text x="440.0" y="40" text-anchor="middle" class="legend-text" fill="#777">数据: 2026-09-21 @build + FTP 128KB 实测(data/stack_report_20260921.md)</text>
<text x="190" y="54" class="legend-text" fill="#555">浅色条 = 分配栈 深色条 = 最坏占用(max(静态最坏, 实测峰值)) 下方文字 = 实测余量/判定</text>
<text x="186" y="72" text-anchor="end" dominant-baseline="central" class="label" fill="#333">defaultTask</text>
<rect class="bar-seg" x="190" y="64" width="162.5" height="16" fill="#BBDEFB" rx="3"/>
<rect x="190" y="64" width="110.1" height="16" fill="#2196F3" rx="3"/>
<text x="190" y="91" dominant-baseline="central" class="legend-text" fill="#333">配置 4096B | 实测峰值 2136B | 最坏 2776B | 余量 1320B (32%) <tspan fill="#2E7D32" font-weight="bold">PASS</tspan></text>
<text x="186" y="112" text-anchor="end" dominant-baseline="central" class="label" fill="#333">netTask</text>
<rect class="bar-seg" x="190" y="104" width="162.5" height="16" fill="#BBDEFB" rx="3"/>
<rect x="190" y="104" width="23.3" height="16" fill="#2196F3" rx="3"/>
<text x="190" y="131" dominant-baseline="central" class="legend-text" fill="#333">配置 4096B | 实测峰值 588B | 最坏 588B | 余量 3508B (85%) <tspan fill="#2E7D32" font-weight="bold">PASS</tspan></text>
<text x="186" y="152" text-anchor="end" dominant-baseline="central" class="label" fill="#333">ftpTask</text>
<rect class="bar-seg" x="190" y="144" width="162.5" height="16" fill="#BBDEFB" rx="3"/>
<rect x="190" y="144" width="47.0" height="16" fill="#2196F3" rx="3"/>
<text x="190" y="171" dominant-baseline="central" class="legend-text" fill="#333">配置 4096B | 实测峰值 1184B | 最坏 1184B | 余量 2912B (71%) <tspan fill="#2E7D32" font-weight="bold">PASS</tspan></text>
<text x="186" y="192" text-anchor="end" dominant-baseline="central" class="label" fill="#333">testTask</text>
<rect class="bar-seg" x="190" y="184" width="325.0" height="16" fill="#FFE0B2" rx="3"/>
<rect x="190" y="184" width="13.8" height="16" fill="#FF9800" rx="3"/>
<text x="190" y="211" dominant-baseline="central" class="legend-text" fill="#333">配置 8192B | 实测峰值 348B | 最坏 348B | 余量 7844B (95%) <tspan fill="#2E7D32" font-weight="bold">PASS</tspan></text>
<text x="186" y="232" text-anchor="end" dominant-baseline="central" class="label" fill="#333">uiTask</text>
<rect class="bar-seg" x="190" y="224" width="650.0" height="16" fill="#FFE0B2" rx="3"/>
<rect x="190" y="224" width="151.7" height="16" fill="#FF9800" rx="3"/>
<text x="190" y="251" dominant-baseline="central" class="legend-text" fill="#333">配置 16384B | 实测峰值 3824B | 最坏 3824B | 余量 12560B (76%) <tspan fill="#2E7D32" font-weight="bold">PASS</tspan></text>
<text x="186" y="272" text-anchor="end" dominant-baseline="central" class="label" fill="#333">timeSyncTask</text>
<rect class="bar-seg" x="190" y="264" width="81.2" height="16" fill="#BBDEFB" rx="3"/>
<rect x="190" y="264" width="16.7" height="16" fill="#2196F3" rx="3"/>
<text x="190" y="291" dominant-baseline="central" class="legend-text" fill="#333">配置 2048B | 实测峰值 420B | 最坏 420B | 余量 1628B (79%) <tspan fill="#2E7D32" font-weight="bold">PASS</tspan></text>
<text x="186" y="314" text-anchor="end" dominant-baseline="central" class="label" fill="#333">idle</text>
<rect class="bar-seg" x="190" y="308" width="20.3" height="12" fill="#90A4AE" rx="2"/>
<text x="214.3125" y="314" dominant-baseline="central" class="legend-text" fill="#333">512B(未实测)</text>
<text x="186" y="336" text-anchor="end" dominant-baseline="central" class="label" fill="#333">timer</text>
<rect class="bar-seg" x="190" y="330" width="40.6" height="12" fill="#90A4AE" rx="2"/>
<text x="234.625" y="336" dominant-baseline="central" class="legend-text" fill="#333">1024B(未实测)</text>
<text x="190" y="360" class="label" fill="#555">堆总量: 49152B (48KB, RW_CCM) 任务栈合计: 38912B (38.0KB) + 内核栈 1536B</text>
<text x="190" y="376" class="label" fill="#555">实测: free=8784B / min_ever=4848B(2026-09-21,含 FTP 负载) 判定: 6/6 PASS(余量 ≥ max(1024B, 配置×30%))</text>
<rect x="190" y="400" width="10" height="10" fill="#2196F3" rx="2"/>
<text x="204" y="408" class="legend-text" fill="#333">Normal 优先级</text>
<rect x="320" y="400" width="10" height="10" fill="#FF9800" rx="2"/>
<text x="334" y="408" class="legend-text" fill="#333">BelowNormal 优先级</text>
<rect x="480" y="400" width="10" height="10" fill="#90A4AE" rx="2"/>
<text x="494" y="408" class="legend-text" fill="#333">内核任务栈 (idle/timer)</text>
</svg>

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

+28 -25
View File
@@ -7,29 +7,32 @@
.bar-seg { stroke:#fff; stroke-width:0.5; }
</style>
</defs>
<text x="410.0" y="24" text-anchor="middle" class="title">Flash (1MB) 使用布局</text>
<rect class="bar-seg" x="60" y="50" width="155.2" height="40" fill="#2196F3" rx="2"/>
<text x="137.6" y="70.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">代码段 (Code) 214.8KB</text>
<rect class="bar-seg" x="215.24124145507812" y="50" width="8.1" height="40" fill="#4CAF50" rx="2"/>
<text x="227.4" y="70.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">只读数据 (RO) 11.2KB</text>
<rect class="bar-seg" x="223.35418701171875" y="50" width="576.3" height="40" fill="#E0E0E0" rx="2"/>
<text x="511.5" y="70.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">Flash 空闲 797.4KB</text>
<text x="60" y="108" class="label" fill="#333">已用: 226.6KB (22.1%) 空闲: 797.4KB (77.9%) 总量: 1024KB</text>
<text x="60" y="124" class="label" fill="#555">代码段明细 (214.8KB)</text>
<rect class="bar-seg" x="60" y="130" width="233.3" height="24" fill="#4CAF50" rx="2"/>
<text x="176.7" y="142.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">LVGL 库 67.7KB</text>
<rect class="bar-seg" x="293.34072807942687" y="130" width="143.1" height="24" fill="#2196F3" rx="2"/>
<text x="364.9" y="142.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">应用代码/UI 41.5KB</text>
<rect class="bar-seg" x="436.44543041059023" y="130" width="14.2" height="24" fill="#795548" rx="2"/>
<text x="454.7" y="142.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">C 库 (microlib) 4.1KB</text>
<rect class="bar-seg" x="450.6751645634069" y="130" width="38.8" height="24" fill="#9C27B0" rx="2"/>
<text x="493.5" y="142.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">FatFS + dhara 11.3KB</text>
<rect class="bar-seg" x="489.49576317416444" y="130" width="29.5" height="24" fill="#F44336" rx="2"/>
<text x="523.0" y="142.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">CH395F 网络 8.6KB</text>
<rect class="bar-seg" x="519.0182565370768" y="130" width="31.6" height="24" fill="#607D8B" rx="2"/>
<text x="554.6" y="142.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">HAL 驱动 9.2KB</text>
<rect class="bar-seg" x="550.6398879877805" y="130" width="14.3" height="24" fill="#00BCD4" rx="2"/>
<text x="568.9" y="142.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">FreeRTOS 4.1KB</text>
<rect class="bar-seg" x="564.9032621740554" y="130" width="235.1" height="24" fill="#E0E0E0" rx="2"/>
<text x="682.5" y="142.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">其他 68.2KB</text>
<text x="410.0" y="24" text-anchor="middle" class="title">Flash (1MB) 使用布局 — 2026-09-21 @build</text>
<rect class="bar-seg" x="60" y="50" width="165.8" height="40" fill="#2196F3" rx="2"/>
<text x="142.9" y="70.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">代码段 (Code) 229.5KB</text>
<rect class="bar-seg" x="225.8270263671875" y="50" width="9.8" height="40" fill="#4CAF50" rx="2"/>
<text x="239.6" y="70.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">只读数据 (RO) 13.5KB</text>
<rect class="bar-seg" x="235.5828857421875" y="50" width="564.0" height="40" fill="#E0E0E0" rx="2"/>
<text x="517.6" y="70.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">Flash 空闲 780.4KB</text>
<text x="60" y="108" class="label" fill="#333">已用: 243.6KB (23.8%) 空闲: 780.4KB (76.2%) 总量: 1024KB</text>
<text x="60" y="124" class="label" fill="#555">代码段明细 (229.5KB)</text>
<rect class="bar-seg" x="60" y="130" width="308.6" height="24" fill="#4CAF50" rx="2"/>
<text x="214.3" y="142.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">LVGL 库 95.7KB</text>
<rect class="bar-seg" x="368.6272640610105" y="130" width="107.4" height="24" fill="#2196F3" rx="2"/>
<text x="422.3" y="142.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">应用代码/UI 33.3KB</text>
<rect class="bar-seg" x="476.0484475010214" y="130" width="25.7" height="24" fill="#9C27B0" rx="2"/>
<text x="505.7" y="142.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">FatFS 8.0KB</text>
<rect class="bar-seg" x="501.7023015116438" y="130" width="15.7" height="24" fill="#FF9800" rx="2"/>
<text x="521.4" y="142.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">dhara / FTL 4.9KB</text>
<rect class="bar-seg" x="517.3919038540107" y="130" width="50.4" height="24" fill="#607D8B" rx="2"/>
<text x="542.6" y="136.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">HAL 驱动</text>
<text x="542.6" y="148.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">15.6KB</text>
<rect class="bar-seg" x="567.7800285986655" y="130" width="31.9" height="24" fill="#00BCD4" rx="2"/>
<text x="603.7" y="142.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">FreeRTOS 内核 9.9KB</text>
<rect class="bar-seg" x="599.6883085932182" y="130" width="8.6" height="24" fill="#F44336" rx="2"/>
<text x="612.3" y="142.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">CH395F 网络 2.7KB</text>
<rect class="bar-seg" x="608.3109764401472" y="130" width="13.3" height="24" fill="#795548" rx="2"/>
<text x="625.6" y="142.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">C 库 (microlib) 4.1KB</text>
<rect class="bar-seg" x="621.6323369195153" y="130" width="178.4" height="24" fill="#E0E0E0" rx="2"/>
<text x="710.8" y="142.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">其他 (长尾) 55.3KB</text>
</svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

+47 -42
View File
@@ -1,4 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 820 320" width="820" height="320" style="font-family:Consolas,'Courier New',monospace; font-size:12px; background:#fff">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 820 360" width="820" height="360" style="font-family:Consolas,'Courier New',monospace; font-size:12px; background:#fff">
<defs>
<style>
.title { font-size:14px; font-weight:bold; }
@@ -7,45 +7,50 @@
.bar-seg { stroke:#fff; stroke-width:0.5; }
</style>
</defs>
<text x="410.0" y="24" text-anchor="middle" class="title">SRAM (128KB) 使用布局</text>
<rect class="bar-seg" x="60" y="50" width="277.5" height="50" fill="#2196F3" rx="2"/>
<text x="198.8" y="75.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">FreeRTOS 堆 (48KB heap_4)</text>
<rect class="bar-seg" x="337.5" y="50" width="231.2" height="50" fill="#4CAF50" rx="2"/>
<text x="453.1" y="75.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">LVGL 内存池 (40KB)</text>
<rect class="bar-seg" x="568.75" y="50" width="74.3" height="50" fill="#FF9800" rx="2"/>
<text x="605.9" y="69.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">UI 帧缓冲</text>
<text x="605.9" y="81.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">(~13KB)</text>
<rect class="bar-seg" x="643.0368041992188" y="50" width="70.1" height="50" fill="#9C27B0" rx="2"/>
<text x="678.1" y="69.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">FTL / 存储</text>
<text x="678.1" y="81.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">(~11KB)</text>
<rect class="bar-seg" x="713.1344604492188" y="50" width="40.1" height="50" fill="#F44336" rx="2"/>
<text x="733.2" y="63.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">网络 /</text>
<text x="733.2" y="75.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">CH395F</text>
<text x="733.2" y="87.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">(~7KB)</text>
<rect class="bar-seg" x="753.2757568359375" y="50" width="17.1" height="50" fill="#00BCD4" rx="2"/>
<text x="774.3" y="75.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">内核 / CMSIS (~3KB)</text>
<rect class="bar-seg" x="770.3485107421875" y="50" width="7.9" height="50" fill="#607D8B" rx="2"/>
<text x="782.3" y="75.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">HAL 驱动 (~1.4KB)</text>
<rect class="bar-seg" x="778.2525634765625" y="50" width="2.8" height="50" fill="#795548" rx="2"/>
<text x="785.1" y="75.0" text-anchor="start" dominant-baseline="central" class="legend-text" fill="#333">其他静态 (~0.5KB)</text>
<rect class="bar-seg" x="781.0641479492188" y="50" width="33.7" height="50" fill="#E0E0E0" rx="2"/>
<rect x="60" y="130" width="12" height="12" fill="#2196F3" rx="2"/>
<text x="76" y="140" class="legend-text" fill="#333">FreeRTOS 堆 (48KB heap_4): 48.0KB (37.5%)</text>
<rect x="60" y="146" width="12" height="12" fill="#4CAF50" rx="2"/>
<text x="76" y="156" class="legend-text" fill="#333">LVGL 内存池 (40KB): 40.0KB (31.2%)</text>
<rect x="60" y="162" width="12" height="12" fill="#FF9800" rx="2"/>
<text x="76" y="172" class="legend-text" fill="#333">UI 帧缓冲 (~13KB): 12.8KB (10.0%)</text>
<rect x="60" y="178" width="12" height="12" fill="#9C27B0" rx="2"/>
<text x="76" y="188" class="legend-text" fill="#333">FTL / 存储 (~11KB): 12.1KB (9.5%)</text>
<rect x="60" y="194" width="12" height="12" fill="#F44336" rx="2"/>
<text x="76" y="204" class="legend-text" fill="#333">网络 / CH395F (~7KB): 6.9KB (5.4%)</text>
<rect x="60" y="210" width="12" height="12" fill="#00BCD4" rx="2"/>
<text x="76" y="220" class="legend-text" fill="#333">内核 / CMSIS (~3KB): 3.0KB (2.3%)</text>
<rect x="60" y="226" width="12" height="12" fill="#607D8B" rx="2"/>
<text x="76" y="236" class="legend-text" fill="#333">HAL 驱动 (~1.4KB): 1.4KB (1.1%)</text>
<rect x="60" y="242" width="12" height="12" fill="#795548" rx="2"/>
<text x="76" y="252" class="legend-text" fill="#333">其他静态 (~0.5KB): 0.5KB (0.4%)</text>
<rect x="60" y="258" width="12" height="12" fill="#E0E0E0" rx="2"/>
<text x="76" y="268" class="legend-text" fill="#333">SRAM 空闲: 5.8KB (4.6%)</text>
<text x="60" y="120" class="label" fill="#333">已用: 122.2KB (95.4%) 空闲: 5.8KB (4.6%) 总量: 128KB</text>
<text x="410.0" y="24" text-anchor="middle" class="title">SRAM (192KB) 使用布局 — 2026-09-21 @build</text>
<text x="60" y="42" class="label" fill="#555">主 SRAM RW_IRAM1 @0x20000000(128KB,DMA 可达)</text>
<rect class="bar-seg" x="60" y="50" width="234.1" height="44" fill="#4CAF50" rx="2"/>
<text x="177.0" y="72.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">LVGL</text>
<rect class="bar-seg" x="294.0728759765625" y="50" width="76.4" height="44" fill="#FF9800" rx="2"/>
<text x="332.3" y="72.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">UI</text>
<rect class="bar-seg" x="370.47119140625" y="50" width="49.8" height="44" fill="#9C27B0" rx="2"/>
<rect class="bar-seg" x="420.2215576171875" y="50" width="30.1" height="44" fill="#8BC34A" rx="2"/>
<rect class="bar-seg" x="450.279541015625" y="50" width="28.3" height="44" fill="#00BCD4" rx="2"/>
<rect class="bar-seg" x="478.5986328125" y="50" width="25.1" height="44" fill="#F44336" rx="2"/>
<rect class="bar-seg" x="503.6940002441406" y="50" width="7.2" height="44" fill="#607D8B" rx="2"/>
<rect class="bar-seg" x="510.9205627441406" y="50" width="5.8" height="44" fill="#795548" rx="2"/>
<rect class="bar-seg" x="516.7018127441406" y="50" width="6.5" height="44" fill="#9E9E9E" rx="2"/>
<rect class="bar-seg" x="523.22265625" y="50" width="276.8" height="44" fill="#E0E0E0" rx="2"/>
<text x="661.6" y="72.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">free</text>
<text x="60" y="112" class="label" fill="#333">已用: 82048B (62.6%) 空闲: 49024B (37.4%) 总量: 128KB</text>
<text x="60" y="136" class="label" fill="#555">CCM RW_CCM @0x10000000(64KB,仅 CPU 可达,DMA 不可达)</text>
<rect class="bar-seg" x="60" y="144" width="277.7" height="44" fill="#2196F3" rx="2"/>
<text x="198.8" y="166.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">heap</text>
<rect class="bar-seg" x="337.6806640625" y="144" width="92.3" height="44" fill="#E0E0E0" rx="2"/>
<text x="383.8" y="166.0" text-anchor="middle" dominant-baseline="central" class="label" fill="#000">free</text>
<text x="60" y="206" class="label" fill="#333">已用: 49184B (75.0%) 空闲: 16352B (25.0%) 总量: 64KB</text>
<rect x="60" y="226" width="12" height="12" fill="#4CAF50" rx="2"/>
<text x="76" y="236" class="legend-text" fill="#333">主SRAM LVGL: 40.5KB (31.6%)</text>
<rect x="60" y="242" width="12" height="12" fill="#FF9800" rx="2"/>
<text x="76" y="252" class="legend-text" fill="#333">主SRAM UI: 13.2KB (10.3%)</text>
<rect x="60" y="258" width="12" height="12" fill="#9C27B0" rx="2"/>
<text x="76" y="268" class="legend-text" fill="#333">主SRAM FTL/BBT: 8.6KB (6.7%)</text>
<rect x="60" y="274" width="12" height="12" fill="#8BC34A" rx="2"/>
<text x="76" y="284" class="legend-text" fill="#333">主SRAM lftpd: 5.2KB (4.1%)</text>
<rect x="60" y="290" width="12" height="12" fill="#00BCD4" rx="2"/>
<text x="76" y="300" class="legend-text" fill="#333">主SRAM CMSIS: 4.9KB (3.8%)</text>
<rect x="420" y="226" width="12" height="12" fill="#F44336" rx="2"/>
<text x="436" y="236" class="legend-text" fill="#333">主SRAM NET: 4.3KB (3.4%)</text>
<rect x="420" y="242" width="12" height="12" fill="#607D8B" rx="2"/>
<text x="436" y="252" class="legend-text" fill="#333">主SRAM HAL: 1.2KB (1.0%)</text>
<rect x="420" y="258" width="12" height="12" fill="#795548" rx="2"/>
<text x="436" y="268" class="legend-text" fill="#333">主SRAM C stack: 1.0KB (0.8%)</text>
<rect x="420" y="274" width="12" height="12" fill="#9E9E9E" rx="2"/>
<text x="436" y="284" class="legend-text" fill="#333">主SRAM other: 1.1KB (0.9%)</text>
<rect x="420" y="290" width="12" height="12" fill="#E0E0E0" rx="2"/>
<text x="436" y="300" class="legend-text" fill="#333">主SRAM free: 47.9KB (37.4%)</text>
<rect x="60" y="322" width="12" height="12" fill="#2196F3" rx="2"/>
<text x="76" y="332" class="legend-text" fill="#333">CCM heap: 48.0KB (75.0%)</text>
<rect x="60" y="338" width="12" height="12" fill="#E0E0E0" rx="2"/>
<text x="76" y="348" class="legend-text" fill="#333">CCM free: 16.0KB (25.0%)</text>
</svg>

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB