diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-06-27 18:19:09 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-06-27 18:19:09 (GMT) |
commit | d19052c161b737a6f13624cad607bcbe91ae0604 (patch) | |
tree | 2b2b1e5eb4b613541496ec58d6bcff795ca6489f /Objects | |
parent | 7ab54e42521335702e879326e868324f2a5b4acb (diff) | |
download | cpython-d19052c161b737a6f13624cad607bcbe91ae0604.zip cpython-d19052c161b737a6f13624cad607bcbe91ae0604.tar.gz cpython-d19052c161b737a6f13624cad607bcbe91ae0604.tar.bz2 |
Issue #9089: Remove references to intobject.c and intobject.h from comments.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/floatobject.c | 17 | ||||
-rw-r--r-- | Objects/frameobject.c | 2 |
2 files changed, 17 insertions, 2 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 9f94003..a2c281e 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -21,7 +21,22 @@ extern int finite(double); #endif -/* Special free list -- see comments for same code in intobject.c. */ +/* Special free list + + Since some Python programs can spend much of their time allocating + and deallocating floats, these operations should be very fast. + Therefore we use a dedicated allocation scheme with a much lower + overhead (in space and time) than straight malloc(): a simple + dedicated free list, filled when necessary with memory from malloc(). + + block_list is a singly-linked list of all PyFloatBlocks ever allocated, + linked via their next members. PyFloatBlocks are never returned to the + system before shutdown (PyFloat_Fini). + + free_list is a singly-linked list of available PyFloatObjects, linked + via abuse of their ob_type members. +*/ + #define BLOCK_SIZE 1000 /* 1K less typical malloc overhead */ #define BHEAD_SIZE 8 /* Enough for a 64-bit pointer */ #define N_FLOATOBJECTS ((BLOCK_SIZE - BHEAD_SIZE) / sizeof(PyFloatObject)) diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 191c6b6..10fb8b3 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -391,7 +391,7 @@ static PyGetSetDef frame_getsetlist[] = { the local variables in f_localsplus are NULL. 2. We also maintain a separate free list of stack frames (just like - integers are allocated in a special way -- see intobject.c). When + floats are allocated in a special way -- see floatobject.c). When a stack frame is on the free list, only the following members have a meaning: ob_type == &Frametype |