diff options
author | Han-Wen Nienhuys <hanwen@lilypond.org> | 2008-08-16 13:57:23 -0300 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@lilypond.org> | 2008-08-16 13:57:23 -0300 |
commit | 82ae1b8eb3413e6be6bd2aa032986fc7782e85ac (patch) | |
tree | 7181f0a89744ce910ab3deb3c3c630fb20bc2829 /libguile/inline.h | |
parent | b474ac33ee0e47ab14306c218cb060667f9af2db (diff) | |
download | guile-82ae1b8eb3413e6be6bd2aa032986fc7782e85ac.tar.gz |
Garbage collection cleanup.
* New file gc-segment-table.c: hold code for the segment table.
* Remove data that might be out of date; remove
scm_i_adjust_min_yield(). We don't store min_yields, since they
are only accurate at one point in time (when the sweep finishes).
We decide the min yield at that point from min_yield_fraction and
freelist->collected / freelist->swept
* Introduce scm_i_gc_heap_size_delta() replacing
scm_i_gc_grow_heap_p().
* Remove foo_1 fields containing penultimate results.
* After GC, count mark bit vector to discover number of live
objects. This simplifies hairy updates.
* Many formatting and layout cleanups.
* Fix in scm_i_sweep_card(): return the length of free_list returned,
rather than number of deleted objects.
* For mtrigger GCs: do not also run a full sweep after the gc() call, as
this is inconsistent with lazy sweeping.
* Remove scm_i_make_initial_segment().
* Use calloc in scm_i_make_empty_heap_segment() to save on
initialization code.
* New function scm_i_sweep_for_freelist() which sweeps, with proper
statistic variable updates.
* New segments are conceptually blocks with 100% reclaimable cells.
* Remove some useless constants/comments: SCM_HEAP_SIZE,
SCM_INIT_HEAP_SIZE, SCM_EXPHEAP, SCM_HEAP_SEG_SIZE
* Do not increment scm_cells_allocated() from the
scm_[double]cell(). This would be a race condition.
* Move some deprecation checks in separate functions to not distract
from main code flow.
Diffstat (limited to 'libguile/inline.h')
-rw-r--r-- | libguile/inline.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/libguile/inline.h b/libguile/inline.h index 8fa9a8cfb..a9b3dc544 100644 --- a/libguile/inline.h +++ b/libguile/inline.h @@ -119,13 +119,6 @@ scm_cell (scm_t_bits car, scm_t_bits cdr) *freelist = SCM_FREE_CELL_CDR (*freelist); } - /* - We update scm_cells_allocated from this function. If we don't - update this explicitly, we will have to walk a freelist somewhere - later on, which seems a lot more expensive. - */ - scm_cells_allocated += 1; - #if (SCM_DEBUG_CELL_ACCESSES == 1) if (scm_debug_cell_accesses_p) { @@ -152,7 +145,6 @@ scm_cell (scm_t_bits car, scm_t_bits cdr) threading. What if another thread is doing GC at this point ... ? */ - #endif @@ -190,8 +182,6 @@ scm_double_cell (scm_t_bits car, scm_t_bits cbr, *freelist = SCM_FREE_CELL_CDR (*freelist); } - scm_cells_allocated += 2; - /* Initialize the type slot last so that the cell is ignored by the GC until it is completely initialized. This is only relevant when the GC can actually run during this code, which it can't |