Mermaid svg height test
The margin on the chart is very high on the narrow screen.
You can repeat the question on this page.
see: https://github.com/mermaid-js/mermaid/issues/2160
graph TB
a[新切片len > 旧切片cap] --> |是|b(扩容)
a --> |否|b1(不扩容)
b --> c[预估新容量newcap]
c --> d{新切片容量最小值 > 2倍旧容量}
d --> |是| e[newcap = 新切片容量最小值]
d --> |否| e1{旧切片长度小于1024}
e1 --> |是| f[newcap = 2倍旧容量]
e1 --> |否| f1[新切片在旧切片容量上每次增长25%直到newcap >= 新切片容量的最小值]
e --> g[内存对齐]
f --> g
f1 --> g
g --> h[预估内存占用 = 预估容量 * 元素类型大小]
h --> i[匹配到runtime申请的内存规格对应的内存]
i --> j[newcap = 匹配到的内存 / 元素类型大小]
classDef mainStep fill:#02d7f2,color:#000
class c,g mainStep
Mermaid svg height test

