Chris, <div><br></div><div>Thanks for the link.<div>
<br><br><div class="gmail_quote">On Mon, Jul 19, 2010 at 11:43 PM, Chris Rebert <span dir="ltr"><<a href="mailto:clp2@rebertia.com">clp2@rebertia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Mon, Jul 19, 2010 at 6:30 PM, Vishal Rana <<a href="mailto:ranavishal@gmail.com">ranavishal@gmail.com</a>> wrote:<br>
> Hi,<br>
> In my web application (Django) I call a function for some request which<br>
> loads like 500 MB data from the database uses it to do some calculation and<br>
> stores the output in disk. I just wonder even after this request is served<br>
> the apache / python process is still shows using that 500 MB, why is it so?<br>
> Can't I release that memory?<br>
<br>
</div></div><a href="http://effbot.org/pyfaq/why-doesnt-python-release-the-memory-when-i-delete-a-large-object.htm" target="_blank">http://effbot.org/pyfaq/why-doesnt-python-release-the-memory-when-i-delete-a-large-object.htm</a><br>

<br>
There are multiple layers of memory allocation involved. To avoid<br>
thrashing+fragmentation and to improve efficiency, free memory is not<br>
always immediately returned to the operating system. Example: If your<br>
problem involved calling your 500MB function twice, free-ing after the<br>
first call and then immediately re-allocating another 500MB of memory<br>
for the second call would waste time.<br>
<div><div></div><div class="h5"><br>
Cheers,<br>
Chris<br>
--<br>
<a href="http://blog.rebertia.com" target="_blank">http://blog.rebertia.com</a><br>
</div></div></blockquote></div><br></div></div>