[Tutor] object size in python is in what units?

Oscar Benjamin oscar.j.benjamin at gmail.com
Tue Jul 23 18:19:31 CEST 2013


On 23 July 2013 16:25, eryksun <eryksun at gmail.com> wrote:
>
> 3.3 also switched to using anonymous mmap on POSIX (where supported),
> and as your link shows -- 3.4 looks to be switching to VirtualAlloc on
> Windows.

Why is it better to use mmap than malloc?

I read a few things about this but the main thing I found seemed to be
that on systems supporting mmap, malloc itself will use mmap for
sufficiently large enough allocations. That would seem to indicate
that CPython would be better off letting the system decide when to use
it (I'm not arguing with the code, just confused).


Oscar


More information about the Tutor mailing list