mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
2 lines
14 KiB
XML
2 lines
14 KiB
XML
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="600px" height="315px" viewBox="-0.5 -0.5 600 315" content="<mxfile modified="2019-03-20T12:30:26.412Z" host="www.draw.io" agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0" version="10.5.0" etag="6tlW0Z3o6eMbtBaf2VAB" type="google"><diagram id="kA1Ox1z_FD5y2ahu_n3k">7Vvdb+I4EP9rIpWTGjkx+XossHv7sCdV6kl3+3RyEwPWhphLTIH+9WfHzocJhBZCrl3IQxtPxh77N2OPPWMMOF5sfk/Rcv4HjXBs2CDaGHBi2LbnQ/5XELaS4Hi+JMxSEkmSVRGeyCtWRKCoKxLhTGNklMaMLHViSJMEh0yjoTSla51tSmNd6hLNcIPwFKK4Sf2LRGwuqb7tVfRvmMzmhWTLDeSXBSqY1UiyOYroukaCXww4Till8m2xGeNYYFfgIut9PfC17FiKE/aWCras8ILilRqb6hfbFoPFSfQgMOOlhCacOJqzRcxLFn/lYtLt37wAisIPUTBBUH59xClZYIZTxSUF4KgBcdVnq0SCWxCmvHa65SzrCmtH4TevwVzQUhwjRl705pFS+axsrpTwSAkXbANlnUM/MIdB9SjTVKZaSikazOgqDbFqo470TrPQDUwHQsfxwNANvMDbbdYEtusPHRd6jg8DV5fCUDrDrCGFv9QQqki5lvdrHN40/k6Ng8CsfQw87yIGYPVlAMOGAWx4MX8DVsMWUrpKIhwpTa7nhOGnJQrF1zVf23XbyFhKf+IxjWma14Ygf/iXKYnjGn06xW4YcnqMnnE8QuHPWS6oYFFml399pBlhhCacHHJ7EVY1esEpI3w9/r7DsCBRJHo+QjGZ7a3x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ylce5vMLRHTCjy+qE86coTO6HHW2IfUcD2nKbG+LgQvvhorc1qL9hflD5xSAeAh3iYu9ybPp2ArHdgPg1D+84k/Ik2Vzrzrp96Ye4/9uXcNjjOW7PjXQBql0HFf4KoO5ZCy4HajMSL0AFdVDPjHl8DFDty4HKi9UPcaTvq37NBL/8Bw==</diagram></mxfile>"><defs/><g><path d="M 155.35 117 L -0.61 117.03" fill="none" stroke="#000000" stroke-width="1.3" stroke-miterlimit="10" pointer-events="none"/><path d="M 155.35 65 L -0.61 65.03" fill="none" stroke="#000000" stroke-width="1.3" stroke-miterlimit="10" pointer-events="none"/><rect x="0" y="39" width="156" height="26" fill="#ffe6cc" stroke="#000000" stroke-width="1.3" pointer-events="none"/><g transform="translate(53.5,41.5)scale(1.3)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="37" height="15" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 38px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">x = 1</div></div></foreignObject><text x="19" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">x = 1</text></switch></g><rect x="0" y="65" width="156" height="26" fill="#ffe6cc" stroke="#000000" stroke-width="1.3" pointer-events="none"/><g transform="translate(72.5,67.5)scale(1.3)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="8" height="15" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 9px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">y</div></div></foreignObject><text x="4" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">y</text></switch></g><rect x="0" y="117" width="156" height="26" fill="#dae8fc" stroke="#000000" stroke-width="1.3" pointer-events="none"/><g transform="translate(9.5,119.5)scale(1.3)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="105" height="15" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 106px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">return address</div></div></foreignObject><text x="53" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">return address</text></switch></g><path d="M 78 155.61 L 78 146.51" fill="none" stroke="#000000" stroke-width="1.3" stroke-miterlimit="10" stroke-dasharray="1.3 1.3" pointer-events="none"/><path d="M 156 169.26 L 156 143.26" fill="none" stroke="#000000" stroke-width="1.3" stroke-miterlimit="10" stroke-dasharray="1.3 1.3" pointer-events="none"/><path d="M 0 169.26 L 0 143.26" fill="none" stroke="#000000" stroke-width="1.3" stroke-miterlimit="10" stroke-dasharray="1.3 1.3" pointer-events="none"/><path d="M 77.35 35.36 L 77.35 26.26" fill="none" stroke="#000000" stroke-width="1.3" stroke-miterlimit="10" stroke-dasharray="1.3 1.3" pointer-events="none"/><path d="M 154.7 39.26 L 154.7 13.26" fill="none" stroke="#000000" stroke-width="1.3" stroke-miterlimit="10" stroke-dasharray="1.3 1.3" pointer-events="none"/><path d="M 0 39.26 L 0 13.26" fill="none" stroke="#000000" stroke-width="1.3" stroke-miterlimit="10" stroke-dasharray="1.3 1.3" pointer-events="none"/><rect x="195" y="26" width="403" height="117" fill="#ffe6cc" stroke="#000000" stroke-width="1.3" pointer-events="none"/><g transform="translate(200.5,30.5)scale(1.3)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="240" height="82" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: monospace; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 241px; white-space: nowrap; overflow-wrap: normal;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><div style="font-size: 14px" align="left"><font style="font-size: 14px">fn outer() {</font></div><div style="font-size: 14px" align="left"><font style="font-size: 14px"> let x = 1;</font></div><div style="font-size: 14px" align="left"><font style="font-size: 14px"> let y =</font> inner(x);</div><div style="font-size: 14px" align="left"> deallocate(y, size_of(u32));<br /></div><div style="font-size: 14px" align="left">}<br /></div></div></div></foreignObject><text x="120" y="47" fill="#000000" text-anchor="middle" font-size="12px" font-family="monospace">[Not supported by viewer]</text></switch></g><rect x="195" y="169" width="403" height="130" fill="#dae8fc" stroke="#000000" stroke-width="1.3" pointer-events="none"/><g transform="translate(200.5,180.5)scale(1.3)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="296" height="82" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: monospace; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 297px; white-space: nowrap; overflow-wrap: normal;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><div style="font-size: 14px" align="left"><font style="font-size: 14px">fn inner(i: usize) -> *mut u32 {</font></div><div style="font-size: 14px" align="left"><font style="font-size: 14px"> let z = allocate(size_of([u32;3]));</font></div><div style="font-size: 14px" align="left"><font style="font-size: 14px"> z.write([1,2,3]);<br /></font></div><div style="font-size: 14px" align="left"><font style="font-size: 14px"> (z as *mut u32).offset(i)<br /></font></div><div style="font-size: 14px" align="left">}<br /></div></div></div></foreignObject><text x="148" y="47" fill="#000000" text-anchor="middle" font-size="12px" font-family="monospace">[Not supported by viewer]</text></switch></g><rect x="0" y="91" width="156" height="26" fill="#dae8fc" stroke="#000000" stroke-width="1.3" pointer-events="none"/><g transform="translate(56.5,93.5)scale(1.3)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="33" height="15" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 34px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">i = 1</div></div></foreignObject><text x="17" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">i = 1</text></switch></g><path d="M 404.48 84.19 L 429 84.39 Q 442 84.5 442 97.5 L 442 143 Q 442 156 429 156 L 182 156 Q 169 156 169 169 L 169 175.5 Q 169 182 177.26 182.27 L 185.52 182.54" fill="none" stroke="#d79b00" stroke-width="1.3" stroke-miterlimit="10" pointer-events="none"/><path d="M 192.34 182.76 L 183.09 187.01 L 185.52 182.54 L 183.39 177.92 Z" fill="#d79b00" stroke="#d79b00" stroke-width="1.3" stroke-miterlimit="10" pointer-events="none"/><path d="M 78 298.61 L 78 289.51" fill="none" stroke="#000000" stroke-width="1.3" stroke-miterlimit="10" stroke-dasharray="1.3 1.3" pointer-events="none"/><path d="M 156 312.26 L 156 286.26" fill="none" stroke="#000000" stroke-width="1.3" stroke-miterlimit="10" stroke-dasharray="1.3 1.3" pointer-events="none"/><path d="M 0 312.26 L 0 286.26" fill="none" stroke="#000000" stroke-width="1.3" stroke-miterlimit="10" stroke-dasharray="1.3 1.3" pointer-events="none"/><g transform="translate(31.5,3.5)scale(1.3)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="71" height="15" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Call Stack</div></div></foreignObject><text x="36" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">Call Stack</text></switch></g><g transform="translate(53.5,185.5)scale(1.3)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="37" height="15" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Heap</div></div></foreignObject><text x="19" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">Heap</text></switch></g><rect x="0" y="234" width="156" height="26" fill="#f8cecc" stroke="#000000" stroke-width="1.3" pointer-events="none"/><g transform="translate(41.5,236.5)scale(1.3)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="55" height="15" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 56px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">z[1] = 2</div></div></foreignObject><text x="28" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">z[1] = 2</text></switch></g><rect x="0" y="260" width="156" height="26" fill="#f8cecc" stroke="#000000" stroke-width="1.3" pointer-events="none"/><g transform="translate(41.5,262.5)scale(1.3)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="55" height="15" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 56px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">z[2] = 3</div></div></foreignObject><text x="28" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">z[2] = 3</text></switch></g><rect x="0" y="208" width="156" height="26" fill="#f8cecc" stroke="#000000" stroke-width="1.3" pointer-events="none"/><g transform="translate(41.5,210.5)scale(1.3)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="55" height="15" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 56px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">z[0] = 1</div></div></foreignObject><text x="28" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">z[0] = 1</text></switch></g></g></svg> |