[Numpy-discussion] Memory allocation cleanup

Frédéric Bastien nouiz at nouiz.org
Thu Jan 9 19:35:32 EST 2014


This shouldn't affect Theano. So I have no objection.

Making thing faster and more tracktable is always good. So I think it
seam a good idea.

Fred

On Thu, Jan 9, 2014 at 6:21 PM, Charles R Harris
<charlesr.harris at gmail.com> wrote:
> Apropos Julian's changes to use the PyObject_* allocation suite for some
> parts of numpy, I posted the following
>
> I think numpy memory management is due a cleanup. Currently we have
>
> PyDataMem_*
> PyDimMem_*
> PyArray_*
>
> Plus the malloc, PyMem_*, and PyObject_* interfaces. That is six ways to
> manage heap allocations. As far as I can tell, PyArray_* is always PyMem_*
> in practice. We probably need to keep the PyDataMem family as it has a
> memory tracking option, but PyDimMem just confuses things, I'd rather just
> use PyMem_* with explicit size. Curiously, the PyObject_Malloc family is not
> documented apart from some release notes.
>
> We should also check for the macro versions of PyMem_* as they are
> deprecated for extension modules.
>
> Nathaniel then suggested that we consider going all Python allocators,
> especially as new memory tracing tools are coming online in 3.4. Given that
> these changes could have some impact on current extension writers I thought
> I'd bring this up on the list to gather opinions.
>
> Thoughts?
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>



More information about the NumPy-Discussion mailing list