• Victor Stinner's avatar
    bpo-18835: Cleanup pymalloc (#4200) · 9ed83c40
    Victor Stinner yazdı
    Cleanup pymalloc:
    
    * Rename _PyObject_Alloc() to pymalloc_alloc()
    * Rename _PyObject_FreeImpl() to pymalloc_free()
    * Rename _PyObject_Realloc() to pymalloc_realloc()
    * pymalloc_alloc() and pymalloc_realloc() don't fallback on the raw
      allocator anymore, it now must be done by the caller
    * Add "success" and "failed" labels to pymalloc_alloc() and
      pymalloc_free()
    * pymalloc_alloc() and pymalloc_free() don't update
      num_allocated_blocks anymore: it should be done in the caller
    * _PyObject_Calloc() is now responsible to fill the memory block
      allocated by pymalloc with zeros
    * Simplify pymalloc_alloc() prototype
    * _PyObject_Realloc() now calls _PyObject_Malloc() rather than
      calling directly pymalloc_alloc()
    
    _PyMem_DebugRawAlloc() and _PyMem_DebugRawRealloc():
    
    * document the layout of a memory block
    * don't increase the serial number if the allocation failed
    * check for integer overflow before computing the total size
    * add a 'data' variable to make the code easiler to follow
    
    test_setallocators() of _testcapimodule.c now test also the context.
    9ed83c40
Adı
Son kayıt (commit)
Son güncelleme
.github Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Programs Loading commit data...
Python Loading commit data...
Tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
.travis.yml Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README.rst Loading commit data...
aclocal.m4 Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...