Color

Defines

#define tm_DEFAULT_ALLOC_COLOR   tm_ECRU
 Default allocated nodes to "not marked".
#define tm_SWEEP_ALLOC_COLOR   tm_GREY
 Default allocated node color during sweep.

Enumerations

enum  tm_color {
  tm_WHITE, tm_ECRU, tm_GREY, tm_BLACK,
  tm_TOTAL, tm__LAST, tm_B = tm__LAST, tm_CAPACITY = tm_B,
  tm_NU, tm_b, tm_b_NU, tm__LAST2,
  tm_B_OS = tm__LAST2, tm_b_OS, tm_B_OS_M, tm_b_OS_M,
  tm__LAST3, tm_FREE_BLOCK = tm_WHITE, tm_LIVE_BLOCK = tm_ECRU, tm_FREE_TYPE = tm_GREY,
  tm_LIVE_TYPE = tm_BLACK
}
 

The color of a node.

More...

Variables

static const tm_color tm_phase_alloc []

Define Documentation

#define tm_DEFAULT_ALLOC_COLOR   tm_ECRU

Default allocated nodes to "not marked".

Rational: some are allocated but thrown away early.

Definition at line 237 of file tm.c.

#define tm_SWEEP_ALLOC_COLOR   tm_GREY

Default allocated node color during sweep.

Rational: tm_ECRU is considered garabage during tm_SWEEP.

Assume that new nodes are actually in-use and may contain pointers to prevent accidental sweeping.

Definition at line 248 of file tm.c.


Enumeration Type Documentation

enum tm_color

The color of a node.

Values greater than tm_BLACK are used as indicies into accounting arrays.

Enumerator:
tm_WHITE 

Node colors.

Free, in free list.

tm_ECRU 

Allocated.

tm_GREY 

Marked in use, scheduled for interior scanning.

tm_BLACK 

Marked in use, scanned.

tm_TOTAL 

Accounting.

Total nodes of any color.

tm__LAST 
tm_B 

Type-level Stats.

Total blocks in use.

tm_CAPACITY 
tm_NU 

Total nodes in use.

tm_b 

Total bytes in use.

tm_b_NU 

Avg bytes/node.

tm__LAST2 
tm_B_OS 

Block-level Stats.

Blocks currently allocated from OS.

tm_b_OS 

Bytes currently allocated from OS.

tm_B_OS_M 

Peak blocks allocated from OS.

tm_b_OS_M 

Peak bytes allocated from OS.

tm__LAST3 
tm_FREE_BLOCK 

Aliases for internal structure coloring.

Color of a free tm_block.

tm_LIVE_BLOCK 

Color of a live, in-use tm_block.

tm_FREE_TYPE 

Color of a free tm_type.

tm_LIVE_TYPE 

Color of a live, in-use tm_type.

Definition at line 21 of file color.h.

00021                       {
00022   /*! Node colors */
00023 
00024   /*! Free, in free list. */
00025   tm_WHITE,
00026   /*! Allocated. */
00027   tm_ECRU,
00028   /*! Marked in use, scheduled for interior scanning. */
00029   tm_GREY,
00030   /*! Marked in use, scanned. */
00031   tm_BLACK,        
00032 
00033   /*! Accounting */
00034 
00035   /*! Total nodes of any color. */
00036   tm_TOTAL,        
00037   tm__LAST,
00038 
00039   /*! Type-level Stats. */
00040 
00041   /*! Total blocks in use. */
00042   tm_B = tm__LAST,
00043   tm_CAPACITY = tm_B,
00044   /*! Total nodes in use. */ 
00045   tm_NU,
00046   /*! Total bytes in use. */
00047   tm_b,
00048   /*! Avg bytes/node. */
00049   tm_b_NU,
00050   tm__LAST2,
00051 
00052   /*! Block-level Stats. */
00053 
00054   /*! Blocks currently allocated from OS. */
00055   tm_B_OS = tm__LAST2,
00056   /*! Bytes currently allocated from OS. */ 
00057   tm_b_OS,
00058   /*! Peak blocks allocated from OS. */
00059   tm_B_OS_M,
00060   /*! Peak bytes allocated from OS. */
00061   tm_b_OS_M,
00062   tm__LAST3,
00063 
00064   /*! Aliases for internal structure coloring. */
00065 
00066   /*! Color of a free tm_block. */
00067   tm_FREE_BLOCK = tm_WHITE,
00068   /*! Color of a live, in-use tm_block. */
00069   tm_LIVE_BLOCK = tm_ECRU,
00070   /*! Color of a free tm_type. */
00071   tm_FREE_TYPE  = tm_GREY,
00072   /*! Color of a live, in-use tm_type. */
00073   tm_LIVE_TYPE  = tm_BLACK
00074 
00075 } tm_color;


Variable Documentation

const tm_color tm_phase_alloc[] [static]
Initial value:
 {
  tm_DEFAULT_ALLOC_COLOR,  
  tm_DEFAULT_ALLOC_COLOR,  
  tm_DEFAULT_ALLOC_COLOR,  
  tm_DEFAULT_ALLOC_COLOR,  
  tm_SWEEP_ALLOC_COLOR,    
  -1
}

Definition at line 251 of file tm.c.

Referenced by _tm_type_alloc_node_from_free_list().


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