<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>第13章 内存模型 on 编程那些事儿</title><link>https://before80.github.io/prgms/Rust/ref/memory-model/</link><description>Recent content in 第13章 内存模型 on 编程那些事儿</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Fri, 21 Aug 2026 22:34:20 +0800</lastBuildDate><atom:link href="https://before80.github.io/prgms/Rust/ref/memory-model/index.xml" rel="self" type="application/rss+xml"/><item><title>01-内存分配与生命周期</title><link>https://before80.github.io/prgms/Rust/ref/memory-model/01-memory-allocation-and-lifetime/</link><pubDate>Tue, 18 Aug 2026 08:45:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/ref/memory-model/01-memory-allocation-and-lifetime/</guid><description>&lt;blockquote&gt;
&lt;p&gt;译文 · 基于 &lt;a href="https://doc.rust-lang.org/reference/"&gt;The Rust Reference&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://doc.rust-lang.org/reference/memory-allocation-and-lifetime.html"&gt;https://doc.rust-lang.org/reference/memory-allocation-and-lifetime.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;r[alloc]&lt;/p&gt;
&lt;h1 id="内存分配与生命周期"&gt;内存分配与生命周期&lt;/h1&gt;
&lt;p&gt;r[alloc.static]
程序的&lt;em&gt;项&lt;/em&gt;是那些在编译时计算其值、并唯一存储在 rust 进程内存映像中的函数、模块与类型。项既不会被动态分配，也不会被释放。&lt;/p&gt;</description></item><item><title>02-变量</title><link>https://before80.github.io/prgms/Rust/ref/memory-model/02-variables/</link><pubDate>Tue, 18 Aug 2026 08:45:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/ref/memory-model/02-variables/</guid><description>&lt;blockquote&gt;
&lt;p&gt;译文 · 基于 &lt;a href="https://doc.rust-lang.org/reference/"&gt;The Rust Reference&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://doc.rust-lang.org/reference/variables.html"&gt;https://doc.rust-lang.org/reference/variables.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;r[variable]&lt;/p&gt;
&lt;h1 id="变量"&gt;变量&lt;/h1&gt;
&lt;p&gt;r[variable.intro]
&lt;em&gt;变量&lt;/em&gt;是栈帧的组成部分，可以是具名函数参数、匿名&lt;a href="../statements-and-expressions/02-expressions/#temporaries"&gt;临时值&lt;/a&gt;，或具名局部变量。&lt;/p&gt;
&lt;p&gt;r[variable.local]
&lt;em&gt;局部变量&lt;/em&gt;（或&lt;em&gt;栈局部&lt;/em&gt;分配）直接持有一个值，分配在栈的内存中。该值是栈帧的一部分。&lt;/p&gt;</description></item></channel></rss>