Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f6386306
Commit
f6386306
authored
Mar 02, 2006
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document the purpose of the struct _block members.
parent
6fd92dc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
Python/pyarena.c
Python/pyarena.c
+18
-1
No files found.
Python/pyarena.c
View file @
f6386306
#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
...
...
@@ -10,9 +10,26 @@
#define DEFAULT_BLOCK_SIZE 8192
typedef
struct
_block
{
/* Total number of bytes owned by this block available to pass out.
* Read-only after initialization. The first such byte starts at
* ab_mem.
*/
size_t
ab_size
;
/* Total number of bytes already passed out. The next byte available
* to pass out starts at ab_mem + ab_offset.
*/
size_t
ab_offset
;
/* An arena maintains a singly-linked, NULL-terminated list of
* all blocks owned by the arena. These are linked via the
* ab_next member.
*/
struct
_block
*
ab_next
;
/* Pointer to the first allocatable byte owned by this block. Read-
* only after initialization.
*/
void
*
ab_mem
;
}
block
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment