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

2014-04-17 Thread Nathaniel Smith
On Wed, Apr 16, 2014 at 12:51 PM, Julian Taylor 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 allowing > other modules to repla

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

2014-04-17 Thread Nathaniel Smith
On Wed, Apr 16, 2014 at 7:35 PM, Victor Stinner wrote: > Hi, > > 2014-04-16 7:51 GMT-04:00 Julian Taylor : >> 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 u

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

2014-04-16 Thread Victor Stinner
Hi, 2014-04-16 7:51 GMT-04:00 Julian Taylor : > 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. http://legacy.python.org/dev/peps/pep-0445/

[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 P

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 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 J. Smith Postdoc

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

2014-04-15 Thread Victor Stinner
Hi, 2014-04-14 1:39 GMT-04:00 Nathaniel Smith : > 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 someone about

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: https://mail.python.org/mailman/options/python-dev/archive%40mail-arc

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() opti

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 a

[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