<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>底层数组 on Tony Bai</title><link>https://tonybai.com/tags/%E5%BA%95%E5%B1%82%E6%95%B0%E7%BB%84/</link><description>Recent content in 底层数组 on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Thu, 02 Oct 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/%E5%BA%95%E5%B1%82%E6%95%B0%E7%BB%84/index.xml" rel="self" type="application/rss+xml"/><item><title>Go 考古：Slice 的“隐秘角落”——只读切片与扩容策略的权衡</title><link>https://tonybai.com/2025/10/02/go-archaeology-slice/</link><pubDate>Thu, 02 Oct 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/10/02/go-archaeology-slice/</guid><description>本文永久链接 – https://tonybai.com/2025/10/02/go-archaeology-slice 大家好，我是Tony Bai。 slice（切片），可以说是 Go 语言中最重要、也最常用的数据结构，没有之一。我们每天都在使用它，尤其是 append 函数，它就像一个魔术师，总能“恰到好处”地为我们管理好底层数组的容量，让我们几乎感受不到内存分配的烦恼。 但你是否想过，这份...</description></item><item><title>Go究竟是否为空切片分配了底层数组</title><link>https://tonybai.com/2022/02/15/whether-go-allocate-underlying-array-for-empty-slice/</link><pubDate>Tue, 15 Feb 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/02/15/whether-go-allocate-underlying-array-for-empty-slice/</guid><description>本文永久链接 – https://tonybai.com/2022/02/15/whether-go-allocate-underlying-array-for-empty-slice 这周在“Go语言第一课”的留言区看到一位同学的这样一个问题： 切片是Go语言中的一个重要的语法元素，也是日常Go开发中使用最为频繁的语法元素。有过Go语言开发经验的童鞋估计大多都知道空切片(empty slice)...</description></item></channel></rss>