/[guile]/guile/guile-core/libguile/gc-card.c
ViewVC logotype

Diff of /guile/guile-core/libguile/gc-card.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by hanwen, Sun Sep 8 11:31:32 2002 UTC revision 1.8 by hanwen, Tue Dec 10 13:26:25 2002 UTC
# Line 81  SCM scm_i_structs_to_free; Line 81  SCM scm_i_structs_to_free;
81    It would be cleaner to have a separate function sweep_value(), but    It would be cleaner to have a separate function sweep_value(), but
82    that is too slow (functions with switch statements can't be    that is too slow (functions with switch statements can't be
83    inlined).    inlined).
84    
85    
86    
87        
88   */    NOTE:
89    
90      This function is quite efficient. However, for many types of cells,
91      allocation and a de-allocation involves calling malloc() and
92      free().
93    
94      This is costly for small objects (due to malloc/free overhead.)
95      (should measure this).
96    
97      It might also be bad for threads: if several threads are allocating
98      strings concurrently, then mallocs for both threads may have to
99      fiddle with locks.
100    
101      It might be interesting to add a separate memory pool for small
102      objects to each freelist.
103    
104      --hwn.
105     */
106  int  int
107  scm_i_sweep_card (scm_t_cell *  p, SCM *free_list, scm_t_heap_segment*seg)  scm_i_sweep_card (scm_t_cell *  p, SCM *free_list, scm_t_heap_segment*seg)
108  #define FUNC_NAME "sweep_card"  #define FUNC_NAME "sweep_card"

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26