Re: [Python-Dev] [numpy wishlist] PyMem_*Calloc

2014-04-17 Thread Nathaniel Smith
On Wed, Apr 16, 2014 at 12:51 PM, Julian Taylor jtaylor.deb...@googlemail.com wrote: Hi, In NumPy what we want is the tracing, not the exchangeable allocators. I don't think it is a good idea for the core of a whole stack of C-extension based modules to replace the default allocator or

Re: [Python-Dev] [numpy wishlist] PyMem_*Calloc

2014-04-17 Thread Nathaniel Smith
On Wed, Apr 16, 2014 at 7:35 PM, Victor Stinner victor.stin...@gmail.com wrote: Hi, 2014-04-16 7:51 GMT-04:00 Julian Taylor jtaylor.deb...@googlemail.com: In NumPy what we want is the tracing, not the exchangeable allocators. Did you read the PEP 445? Using the new malloc API, in fact you

[Python-Dev] [numpy wishlist] PyMem_*Calloc

2014-04-16 Thread Julian Taylor
Hi, In NumPy what we want is the tracing, not the exchangeable allocators. I don't think it is a good idea for the core of a whole stack of C-extension based modules to replace the default allocator or allowing other modules to replace the allocator NumPy uses. I think it would be more useful if

Re: [Python-Dev] [numpy wishlist] PyMem_*Calloc

2014-04-16 Thread Victor Stinner
Hi, 2014-04-16 7:51 GMT-04:00 Julian Taylor jtaylor.deb...@googlemail.com: In NumPy what we want is the tracing, not the exchangeable allocators. Did you read the PEP 445? Using the new malloc API, in fact you can have both: install new allocators and set up hooks on allocators.

Re: [Python-Dev] [numpy wishlist] PyMem_*Calloc

2014-04-15 Thread Charles-François Natali
Indeed, that's very reasonable. Please open an issue on the tracker! ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] [numpy wishlist] PyMem_*Calloc

2014-04-15 Thread Victor Stinner
Hi, 2014-04-14 1:39 GMT-04:00 Nathaniel Smith n...@pobox.com: The new tracemalloc infrastructure in python 3.4 is super-interesting to numerical folks, because we really like memory profiling. Cool, thanks :-) calloc() is more awesome than malloc()+memset() (...) I had a discussion with

Re: [Python-Dev] [numpy wishlist] PyMem_*Calloc

2014-04-15 Thread Nathaniel Smith
On Tue, Apr 15, 2014 at 9:31 AM, Charles-François Natali cf.nat...@gmail.com wrote: Indeed, that's very reasonable. Please open an issue on the tracker! Done! http://bugs.python.org/issue21233 I'll ping numpy-discussion and see if I can convince someone to do the work ;-). -n -- Nathaniel

[Python-Dev] [numpy wishlist] PyMem_*Calloc

2014-04-14 Thread Nathaniel Smith
Hi all, The new tracemalloc infrastructure in python 3.4 is super-interesting to numerical folks, because we really like memory profiling. Numerical programs allocate a lot of memory, and sometimes it's not clear which operations allocate memory (some numpy operations return views of the original

Re: [Python-Dev] [numpy wishlist] PyMem_*Calloc

2014-04-14 Thread Benjamin Peterson
On Sun, Apr 13, 2014, at 22:39, Nathaniel Smith wrote: Hi all, The new tracemalloc infrastructure in python 3.4 is super-interesting to numerical folks, because we really like memory profiling. Numerical programs allocate a lot of memory, and sometimes it's not clear which operations

Re: [Python-Dev] [numpy wishlist] PyMem_*Calloc

2014-04-14 Thread Ethan Furman
On 04/14/2014 08:36 AM, Benjamin Peterson wrote: On Sun, Apr 13, 2014, at 22:39, Nathaniel Smith wrote: SO, we'd like to route our allocations through PyMem_* in order to let tracemalloc see them, but because there is no PyMem_*Calloc, doing this would force us to give up on the calloc()