00001 /** \file color.h 00002 * \brief Color. 00003 * 00004 * $Id: internal.h,v 1.17 2009-08-01 10:47:31 stephens Exp $ 00005 */ 00006 #ifndef tredmill_COLOR_H 00007 #define tredmill_COLOR_H 00008 00009 00010 /****************************************************************************/ 00011 /*! \defgroup color Color */ 00012 /*@{*/ 00013 00014 00015 /** 00016 * The color of a node. 00017 * 00018 * Values greater than tm_BLACK are used as indicies 00019 * into accounting arrays. 00020 */ 00021 typedef enum tm_color { 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; 00076 00077 00078 /*@}*/ 00079 00080 #endif