Message328698
> 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. |
|
Date |
User |
Action |
Args |
2018-10-28 16:07:47 | vstinner | set | recipients:
+ vstinner, berker.peksag, serhiy.storchaka, izbyshev |
2018-10-28 16:07:47 | vstinner | set | messageid: <1540742867.31.0.788709270274.issue35090@psf.upfronthosting.co.za> |
2018-10-28 16:07:47 | vstinner | link | issue35090 messages |
2018-10-28 16:07:47 | vstinner | create | |
|