11#include "Python.h"
22#include "pyarena.h"
33
4- /* A simple arena block structure
4+ /* A simple arena block structure
55
66 Measurements with standard library modules suggest the average
77 allocation is about 20 bytes and that most compiles use a single
@@ -20,7 +20,7 @@ typedef struct _block {
2020 and a list of PyObject* pointers. PyObjects are decrefed
2121 when the arena is freed.
2222*/
23-
23+
2424struct _arena {
2525 block * a_head ;
2626 block * a_cur ;
@@ -38,7 +38,7 @@ struct _arena {
3838static block *
3939block_new (size_t size )
4040{
41- /* Allocate header and block as one unit.
41+ /* Allocate header and block as one unit.
4242 ab_mem points just past header. */
4343 block * b = (block * )malloc (sizeof (block ) + size );
4444 if (!b )
@@ -120,7 +120,7 @@ PyArena_Free(PyArena *arena)
120120 assert (arena );
121121#if defined(Py_DEBUG )
122122 /*
123- fprintf(stderr,
123+ fprintf(stderr,
124124 "alloc=%d size=%d blocks=%d block_size=%d big=%d objects=%d\n",
125125 arena->total_allocs, arena->total_size, arena->total_blocks,
126126 arena->total_block_size, arena->total_big_blocks,
@@ -134,7 +134,7 @@ PyArena_Free(PyArena *arena)
134134}
135135
136136void *
137- PyArena_Malloc (PyArena * arena , size_t size )
137+ PyArena_Malloc (PyArena * arena , size_t size )
138138{
139139 void * p = block_alloc (arena -> a_cur , size );
140140 if (!p )
@@ -157,7 +157,7 @@ PyArena_Malloc(PyArena *arena, size_t size)
157157}
158158
159159int
160- PyArena_AddPyObject (PyArena * arena , PyObject * obj )
160+ PyArena_AddPyObject (PyArena * arena , PyObject * obj )
161161{
162162 int r = PyList_Append (arena -> a_objects , obj );
163163 if (r >= 0 ) {
0 commit comments