<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Memory on Alessandro Tironi, Gameplay Programmer</title>
    <link>https://alessandrotironigamedev.com/tags/memory/</link>
    <description>Recent content in Memory on Alessandro Tironi, Gameplay Programmer</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>&lt;a href=&#34;https://creativecommons.org/licenses/by-nc/4.0/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;CC BY-NC 4.0&lt;/a&gt;</copyright>
    <lastBuildDate>Tue, 06 May 2025 12:00:00 +0200</lastBuildDate>
    <atom:link href="https://alessandrotironigamedev.com/tags/memory/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>A pool memory allocator for STL unordered maps</title>
      <link>https://alessandrotironigamedev.com/posts/2025/05/pool-memory-allocator-for-stl-unordered-maps/</link>
      <pubDate>Tue, 06 May 2025 12:00:00 +0200</pubDate>
      <guid>https://alessandrotironigamedev.com/posts/2025/05/pool-memory-allocator-for-stl-unordered-maps/</guid>
      <description>&lt;p&gt;This post is a follow-up of the previous post about pool memory allocators for STL sets, and basically applies the same concepts to another well-known STL container: &lt;code&gt;std::unordered_map&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;In the last post, we saw how to implement a pool memory allocator specifically designed to store the kind of objects allocated by &lt;code&gt;std::set&lt;/code&gt;s, which ultimately turned out being just one type: &lt;code&gt;_Rbnode&amp;lt;T&amp;gt;&lt;/code&gt;, where &lt;code&gt;T&lt;/code&gt; is the same as &lt;code&gt;std::set&amp;lt;T&amp;gt; mySet&lt;/code&gt;. This allocator allowed us to significantly reduce the calls to &lt;code&gt;malloc()&lt;/code&gt; and to reduce the risk of external fragmentation, as well as zero-ing the internal fragmentation.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
