diff options
author | Tim Peters <tim.peters@gmail.com> | 2006-03-02 20:37:32 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2006-03-02 20:37:32 (GMT) |
commit | 8cfaa0e729abffd659356adb8eded353ae75d421 (patch) | |
tree | 3346cd75f44864099b36cfc592f488564f0974ef /Python | |
parent | 2e63b73a2cd0d7d560c762a4ae4ed5b2fd5eb7ea (diff) | |
download | cpython-8cfaa0e729abffd659356adb8eded353ae75d421.zip cpython-8cfaa0e729abffd659356adb8eded353ae75d421.tar.gz cpython-8cfaa0e729abffd659356adb8eded353ae75d421.tar.bz2 |
Trimmed trailing whitespace.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pyarena.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/pyarena.c b/Python/pyarena.c index 1af8a87..3b3c162 100644 --- a/Python/pyarena.c +++ b/Python/pyarena.c @@ -1,7 +1,7 @@ #include "Python.h" #include "pyarena.h" -/* A simple arena block structure +/* A simple arena block structure Measurements with standard library modules suggest the average allocation is about 20 bytes and that most compiles use a single @@ -20,7 +20,7 @@ typedef struct _block { and a list of PyObject* pointers. PyObjects are decrefed when the arena is freed. */ - + struct _arena { block *a_head; block *a_cur; @@ -38,7 +38,7 @@ struct _arena { static block * block_new(size_t size) { - /* Allocate header and block as one unit. + /* Allocate header and block as one unit. ab_mem points just past header. */ block *b = (block *)malloc(sizeof(block) + size); if (!b) @@ -120,7 +120,7 @@ PyArena_Free(PyArena *arena) assert(arena); #if defined(Py_DEBUG) /* - fprintf(stderr, + fprintf(stderr, "alloc=%d size=%d blocks=%d block_size=%d big=%d objects=%d\n", arena->total_allocs, arena->total_size, arena->total_blocks, arena->total_block_size, arena->total_big_blocks, @@ -134,7 +134,7 @@ PyArena_Free(PyArena *arena) } void * -PyArena_Malloc(PyArena *arena, size_t size) +PyArena_Malloc(PyArena *arena, size_t size) { void *p = block_alloc(arena->a_cur, size); if (!p) @@ -157,7 +157,7 @@ PyArena_Malloc(PyArena *arena, size_t size) } int -PyArena_AddPyObject(PyArena *arena, PyObject *obj) +PyArena_AddPyObject(PyArena *arena, PyObject *obj) { int r = PyList_Append(arena->a_objects, obj); if (r >= 0) { |