Unmark

Functions

static int _tm_block_sweep_maybe (tm_block *b)
 Maybe sweep a tm_block.
static int _tm_block_sweep_some ()
 Sweep some blocks.
static size_t _tm_node_unmark_some (long left)
 Unmark some tm_BLACK nodes.
static void _tm_node_unmark_all ()
 Unmark all tm_BLACK nodes.

Function Documentation

static int _tm_block_sweep_maybe ( tm_block b  )  [static]

Maybe sweep a tm_block.

NOT USED!

Definition at line 1576 of file tm.c.

01577 {
01578   return 0;
01579 }

static int _tm_block_sweep_some (  )  [static]

Sweep some blocks.

NOT IMPLEMENTED!

Definition at line 1586 of file tm.c.

References tm_block_sweep_some_size, and tm_msg().

Referenced by _tm_gc_full_type_inner().

01587 {
01588   int count = 0;
01589   unsigned long bytes = 0;
01590   int left = tm_block_sweep_some_size;
01591 
01592 #if tm_USE_SBRK
01593   /*
01594   ** Try to sweep last block allocated from OS first
01595   ** because we might be able to return it to the OS.
01596   */
01597 #endif
01598 
01599   /*! NOT IMPLEMENTED! */
01600 
01601 #if 0
01602   if ( count ) 
01603     tm_msg("b s b%lu b%lu\n", (unsigned long) count, (unsigned long) bytes);
01604 #endif
01605 
01606   return count;
01607 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void _tm_node_unmark_all (  )  [static]

Unmark all tm_BLACK nodes.

Definition at line 1646 of file tm.c.

References _tm_node_unmark_some(), tm_data::n, tm, tm_BLACK, tm_node_LOOP_INIT, and tm_TOTAL.

Referenced by _tm_gc_full_type_inner().

01647 {
01648   while ( tm.n[tm_BLACK] ) {
01649     tm_node_LOOP_INIT(tm_BLACK);
01650     _tm_node_unmark_some(tm.n[tm_TOTAL]);
01651   }
01652 }

Here is the call graph for this function:

Here is the caller graph for this function:

static size_t _tm_node_unmark_some ( long  left  )  [static]

Unmark some tm_BLACK nodes.

Definition at line 1614 of file tm.c.

References tm_data::n, tm, tm_assert_test, tm_BLACK, tm_ECRU, tm_msg(), tm_node_color, tm_node_LOOP, tm_node_LOOP_BREAK, tm_node_LOOP_END, tm_node_set_color(), and tm_node_to_block().

Referenced by _tm_alloc_type_inner(), and _tm_node_unmark_all().

01615 {
01616   size_t count = 0, bytes = 0;
01617 
01618   tm_node_LOOP(tm_BLACK);
01619   {
01620     tm_assert_test(tm_node_color(n) == tm_BLACK);
01621     
01622     tm_node_set_color(n, tm_node_to_block(n), tm_ECRU);
01623     
01624     bytes += t->size;
01625     ++ count;
01626     
01627     if ( -- left <= 0 ) {
01628       tm_node_LOOP_BREAK(tm_BLACK);
01629     }
01630   }
01631   tm_node_LOOP_END(tm_BLACK);
01632 
01633 #if 0
01634   if ( count ) 
01635     tm_msg("u n%lu b%lu l%lu\n", count, bytes, tm.n[tm_BLACK]);
01636 #endif
01637 
01638   return tm.n[tm_BLACK];
01639 }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Mon Jan 25 06:33:12 2010 for TM(tredmill) by  doxygen 1.6.1