diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2006-02-28 17:53:04 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2006-02-28 17:53:04 (GMT) |
commit | 77f1bb27782898c1bbcbaffd5a5622930b16bc97 (patch) | |
tree | 7719703cea5bccd41c093ba487895dc858049ee6 /Include | |
parent | 77e42fff31a2864178ee04e54af1e4476c555dce (diff) | |
download | cpython-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')
-rw-r--r-- | Include/pyarena.h | 14 |
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 |