On 17.02.2014 21:16, Sturla Molden wrote:
> Julian Taylor <jtaylor.deb...@googlemail.com> wrote:
> 
>> When an array is created it tries to get its memory from the cache and
>> when its deallocated it returns it to the cache.
> 
> Good idea, however there is already a C function that does this. It uses a
> heap to keep the cached memory blocks sorted according to size. You know it
> as malloc — and is why we call this allocation from the heap. Which by the
> way is what NumPy already does.  ;-)
> 

not with glibc, glibc has no cache for mmap allocated memory.
It does cache sbrk allocated memory and uses a dynamic threshold for
using it but its tuned for generic applications so the maximum threshold
is very low, I think its 32 MB. Far too low for many numerical applications.
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to