summaryrefslogtreecommitdiffstats
path: root/Include/pyarena.h
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2006-02-28 17:53:04 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2006-02-28 17:53:04 (GMT)
commit77f1bb27782898c1bbcbaffd5a5622930b16bc97 (patch)
tree7719703cea5bccd41c093ba487895dc858049ee6 /Include/pyarena.h
parent77e42fff31a2864178ee04e54af1e4476c555dce (diff)
downloadcpython-77f1bb27782898c1bbcbaffd5a5622930b16bc97.zip
cpython-77f1bb27782898c1bbcbaffd5a5622930b16bc97.tar.gz
cpython-77f1bb27782898c1bbcbaffd5a5622930b16bc97.tar.bz2
Real arena implementation
Replace the toy arena implementation with a real one, based on allocating 8K chunks of memory by default.
Diffstat (limited to 'Include/pyarena.h')
-rw-r--r--Include/pyarena.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/Include/pyarena.h b/Include/pyarena.h
index 6f191a1..4c75b55 100644
--- a/Include/pyarena.h
+++ b/Include/pyarena.h
@@ -23,16 +23,10 @@ extern "C" {
PyAPI_FUNC(void *) PyArena_Malloc(PyArena *, size_t);
- /* The next two routines aren't proper arena allocation routines.
- They exist to experiment with the arena API without making wholesale
- changes to the implementation.
-
- The two functions register pointers with the arena id. These
- are externally allocated pointers that will be freed when the
- arena is freed. One takes a pointer allocated with malloc. The
- other takes a PyObject that is DECREFed when the arena is freed.
- */
- PyAPI_FUNC(int) PyArena_AddMallocPointer(PyArena *, void *);
+ /* This routines isn't a proper arena allocation routine. It takes
+ a PyObject* and records it so that it can be DECREFed when the
+ arena is freed.
+ */
PyAPI_FUNC(int) PyArena_AddPyObject(PyArena *, PyObject *);
#ifdef __cplusplus