<p>If you are looking for faster malloc &amp; free, there is a new (13 Feb 2019) drop-in replacement for systems that already support a hardware memory manager unit, MMU. Most computers do, most micro-controllers don't.</p>

<p>There is a paper and a study that shows it reduces Firefox's memory by 16% and Redis by 39%.</p>

<p>It is called Mesh.  <a href="https://arxiv.org/abs/1902.04738" rel="nofollow noreferrer">Mesh dynamic memory allocation</a></p>
Free memory with explicit size
<p>I'm looking for <code>malloc</code>/<code>free</code>-like APIs in mainstream OSs that allow me to specify an explicit size during both allocation and de-allocation. What I hope to gain by this is that the runtime might spend less memory on bookkeeping when the allocated size is already available in the program.</p>

<p>On e.g. windows I only found <code>free()</code>, <code>_aligned_free()</code>, and <code>_freea()</code>, none of which take a second argument for size.</p>