Hi List,<br><br>  I had similar problems on windows. I tried to use memmaps to buffer a large amount of data and process it in chunks. But I found that whenever I tried to do this, I always ended filling up RAM completely which led to crashes of my python script with a MemoryError. This led me to consider, actually from an advice via this list, the module h5py, which has a nice numpy interface to the hdf5 file format. It seemed more clear to me with the h5py-module, what was being buffered on disk and what was stored in RAM.<br>
<br>  Cheers,<br>  Simon<br><br><br><div class="gmail_quote">On Sun, Oct 24, 2010 at 2:15 AM, David Cournapeau <span dir="ltr"><<a href="mailto:cournape@gmail.com">cournape@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Sun, Oct 24, 2010 at 12:44 AM, braingateway <<a href="mailto:braingateway@gmail.com">braingateway@gmail.com</a>> wrote:<br>
<br>
><br>
> I agree with you about the point of using memmap.<br>
<br>
> That is why the behavior<br>
> is so strange to me.<br>
<br>
</div>I think it is expected. What kind of behavior were you expecting ? To<br>
be clear, if I have a lot of available ram, I expect memmap arrays to<br>
take almost all of it (virtual memroy ~ resident memory). Now, if at<br>
the same time, another process starts taking a lot of memory, I expect<br>
the OS to automatically lower resident memory for the process using<br>
memmap.<br>
<br>
I did a small experiment on mac os x, creating a giant mmap'd array in<br>
numpy, and at the same time running a small C program using mlock (to<br>
lock pages into physical memory). As soon as I lock a big area (where<br>
big means most of my physical ram), the python process dealing with<br>
the mmap area sees its resident memory decrease. As soon as I kill the<br>
C program locking the memory, the resident memory starts increasing<br>
again.<br>
<br>
cheers,<br>
<div><div></div><div class="h5"><br>
David<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</div></div></blockquote></div><br>