<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Allocator on Mi&amp;Bee Blog</title><link>/en/tags/allocator/</link><description>Recent content in Allocator on Mi&amp;Bee Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>蓝宝石的傻话</managingEditor><lastBuildDate>Wed, 24 Jun 2026 16:20:00 +0800</lastBuildDate><atom:link href="/en/tags/allocator/rss.xml" rel="self" type="application/rss+xml"/><item><title>Zig Memory Management: The Explicit Allocator Pattern</title><link>/en/posts/programming/zig-memory-allocators/</link><pubDate>Wed, 24 Jun 2026 16:20:00 +0800</pubDate><guid>/en/posts/programming/zig-memory-allocators/</guid><description>&lt;p&gt;This article is based on Zig 0.16.&lt;/p&gt;
&lt;p&gt;In the previous articles we covered Zig&amp;rsquo;s basic syntax and error handling. Now we arrive at the most distinctive part of Zig—&lt;strong&gt;memory management&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If you come from Go or Rust, Zig&amp;rsquo;s memory philosophy will feel unfamiliar: it provides neither garbage collection nor an ownership system. Instead, it chooses a fundamentally different path—the &lt;strong&gt;Allocator Pattern&lt;/strong&gt;. The core convention is remarkably simple, yet far-reaching:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Any function that might allocate memory must accept a &lt;code&gt;std.mem.Allocator&lt;/code&gt; parameter.&lt;/p&gt;</description></item></channel></rss>