On 06/01/2017 01:41 AM, Larry Hastings       wrote:
         ">

(original) (raw)



On Thu, Jun 1, 2017 at 10:45 AM, Larry Hastings <larry@hastings.org> wrote:
On 06/01/2017 01:41 AM, Larry Hastings wrote:
On 06/01/2017 01:19 AM, Antoine Pitrou wrote:
malloc() you said? Arenas are allocated using mmap() nowadays, right?
malloc() and free(). See \_PyObject\_ArenaMalloc (etc) in Objects/obmalloc.c.

Oh, sorry, I forgot how to read. If ARENAS\_USE\_MMAP is on it uses mmap(). I can't figure out when or how MAP\_ANONYMOUS gets set,

MAP\_ANONYMOUS is set by sys/mman.h (where the system supports it), just like the other MAP\_\* defines.
but if I step into the \_PyObject\_Arena.alloc() it indeed calls \_PyObject\_ArenaMmap() which uses mmap(). So, huzzah!, we use mmap() to allocate our enormous 256kb arenas.


/arry


_______________________________________________

Python-Dev mailing list

Python-Dev@python.org

https://mail.python.org/mailman/listinfo/python-dev

Unsubscribe: https://mail.python.org/mailman/options/python-dev/thomas%40python.org





--
Thomas Wouters <thomas@python.org>

Hi! I'm an email virus! Think twice before sending your email to help me spread!