summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-10-31 19:18:10 (GMT)
committerGitHub <noreply@github.com>2017-10-31 19:18:10 (GMT)
commit9ed83c40855b57c10988f76770a4eb825e034cd8 (patch)
treed3652389cce48f88a8405fcc944f0524397d46c6 /Objects/object.c
parentec2cbdd1dff2c51788136480b2085e77506ebf34 (diff)
downloadcpython-9ed83c40855b57c10988f76770a4eb825e034cd8.zip
cpython-9ed83c40855b57c10988f76770a4eb825e034cd8.tar.gz
cpython-9ed83c40855b57c10988f76770a4eb825e034cd8.tar.bz2
bpo-18835: Cleanup pymalloc (#4200)
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.
Diffstat (limited to 'Objects/object.c')
0 files changed, 0 insertions, 0 deletions