This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients josh.r, jtaylor, neologix, njs, pitrou, python-dev, skrah, vstinner
Date 2014-05-03.23:00:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMpsgwafN7y3MS3zxQeKNeBrXyy-k9ybHhfFwZotWFfRGBNPAw@mail.gmail.com>
In-reply-to <1399145399.39.0.348175601691.issue21233@psf.upfronthosting.co.za>
Content
>    "allocate nbytes elements of size 1"

PyObject_Malloc(100) asks to allocate one object of 100 bytes.

For PyMem_Malloc() and PyMem_RawMalloc(), it's more difficult to guess, but
IMO it's sane to bet that a single memory block of size bytes is requested.

I consider that char data[100] is a object of 100 bytes, but you call it
100 object of 1 byte.

I don't think that using nelem or elsize matters in practice.
History
Date User Action Args
2014-05-03 23:00:51vstinnersetrecipients: + vstinner, pitrou, njs, skrah, neologix, python-dev, jtaylor, josh.r
2014-05-03 23:00:51vstinnerlinkissue21233 messages
2014-05-03 23:00:51vstinnercreate