mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Issue #13390: New function :func:sys.getallocatedblocks()
returns the number of memory blocks currently allocated.
Also, the ``-R`` option to regrtest uses this function to guard against memory allocation leaks.
This commit is contained in:
parent
b4b8f234d4
commit
f9d0b1256f
9 changed files with 123 additions and 22 deletions
|
@ -98,6 +98,8 @@ PyAPI_FUNC(void *) PyObject_Malloc(size_t);
|
|||
PyAPI_FUNC(void *) PyObject_Realloc(void *, size_t);
|
||||
PyAPI_FUNC(void) PyObject_Free(void *);
|
||||
|
||||
/* This function returns the number of allocated memory blocks, regardless of size */
|
||||
PyAPI_FUNC(Py_ssize_t) _Py_GetAllocatedBlocks(void);
|
||||
|
||||
/* Macros */
|
||||
#ifdef WITH_PYMALLOC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue