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 berker.peksag, izbyshev, serhiy.storchaka, vstinner
Date 2018-10-28.16:07:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1540742867.31.0.788709270274.issue35090@psf.upfronthosting.co.za>
In-reply-to
Content
> May be we should add a new function (_PyMem_RawMallocItems?) that does the same checks as PyMem_RawCalloc, but doesn't zero-initialize memory?

Please don't add new functions to the Python memory allocators. We already have too many of them :-(
https://docs.python.org/dev/c-api/memory.html

PyZlib_Malloc, PyLzma_Malloc and BZ2_Malloc exists because they use different types: 2 unsigned int (zlib), 2 size_t (lzma), 2 int (bz2). PyMem_RawMalloc() expects a single size_t.

IMHO it's fine to have a function of 5 lines of code in each module, since each module uses a different C type.
History
Date User Action Args
2018-10-28 16:07:47vstinnersetrecipients: + vstinner, berker.peksag, serhiy.storchaka, izbyshev
2018-10-28 16:07:47vstinnersetmessageid: <1540742867.31.0.788709270274.issue35090@psf.upfronthosting.co.za>
2018-10-28 16:07:47vstinnerlinkissue35090 messages
2018-10-28 16:07:47vstinnercreate