summaryrefslogtreecommitdiffstats
path: root/Include/objimpl.h
diff options
context:
space:
mode:
authorKristján Valur Jónsson <kristjan@ccpgames.com>2009-09-28 13:12:38 (GMT)
committerKristján Valur Jónsson <kristjan@ccpgames.com>2009-09-28 13:12:38 (GMT)
commit02ca57ce4c728c4a18d31a6a3f2681bcd1aea2da (patch)
treee8324025b807032f476c398675dc7a162c2440de /Include/objimpl.h
parentd12f86ce96d3aeb91e9c7f010e303bbc1b8d14da (diff)
downloadcpython-02ca57ce4c728c4a18d31a6a3f2681bcd1aea2da.zip
cpython-02ca57ce4c728c4a18d31a6a3f2681bcd1aea2da.tar.gz
cpython-02ca57ce4c728c4a18d31a6a3f2681bcd1aea2da.tar.bz2
http://bugs.python.org/issue6836
The debug memory api now keeps track of which external API (PyMem_* or PyObject_*) was used to allocate each block and treats any API violation as an error. Added separate _PyMem_DebugMalloc functions for the Py_Mem API instead of having it use the _PyObject_DebugMalloc functions.
Diffstat (limited to 'Include/objimpl.h')
-rw-r--r--Include/objimpl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/objimpl.h b/Include/objimpl.h
index 55186b1..4176c6b 100644
--- a/Include/objimpl.h
+++ b/Include/objimpl.h
@@ -108,6 +108,13 @@ PyAPI_FUNC(void) _PyObject_DebugFree(void *p);
PyAPI_FUNC(void) _PyObject_DebugDumpAddress(const void *p);
PyAPI_FUNC(void) _PyObject_DebugCheckAddress(const void *p);
PyAPI_FUNC(void) _PyObject_DebugMallocStats(void);
+PyAPI_FUNC(void *) _PyObject_DebugMallocApi(char api, size_t nbytes);
+PyAPI_FUNC(void *) _PyObject_DebugReallocApi(char api, void *p, size_t nbytes);
+PyAPI_FUNC(void) _PyObject_DebugFreeApi(char api, void *p);
+PyAPI_FUNC(void) _PyObject_DebugCheckAddressApi(char api, const void *p);
+PyAPI_FUNC(void *) _PyMem_DebugMalloc(size_t nbytes);
+PyAPI_FUNC(void *) _PyMem_DebugRealloc(void *p, size_t nbytes);
+PyAPI_FUNC(void) _PyMem_DebugFree(void *p);
#define PyObject_MALLOC _PyObject_DebugMalloc
#define PyObject_Malloc _PyObject_DebugMalloc
#define PyObject_REALLOC _PyObject_DebugRealloc