<?xml version="1.0" encoding="windows-1252"?>
<node id="243310" title="Re^4: Memory usage and perl" created="2003-03-15 11:12:04" updated="2005-06-29 02:17:17">
<type id="11">
note</type>
<author id="107541">
fokat</author>
<data>
<field name="doctext">
&lt;P&gt;Thanks a lot for the reference, [derby] (and ++ for your nitpicking). I have a small difference, though...&lt;/P&gt;

&lt;P&gt; Actually, &lt;tt&gt;mmap()&lt;/tt&gt; does not allocate memory. What it does is map pages belonging to a file, probably from the buffer cache, into your process' private address space. Certainly it is a neat trick, but might have undesired side effects when competing with file-related resources in the same machine, specially with a static buffer cache.&lt;/P&gt;

&lt;P&gt;They will "return" the memory to the OS because the memory was not originally allocated to your process. I am glad to see certain implementations of &lt;tt&gt;malloc()&lt;/tt&gt; and &lt;tt&gt;free()&lt;/tt&gt; taking advantage of this.&lt;/P&gt;

&lt;P&gt;Best regards&lt;/P&gt;

&lt;P&gt;-&lt;A HREF="http://mipagina.cantv.net/lem/"&gt;lem&lt;/A&gt;, but some call me fokat</field>
<field name="root_node">
243025</field>
<field name="parent_node">
243106</field>
</data>
</node>
