标签:
/******************************************************************//** Try to free a replaceable block. @return TRUE if found and freed */ UNIV_INTERN ibool buf_LRU_search_and_free_block( /*==========================*/ buf_pool_t* buf_pool, /*!< in: buffer pool instance */ ulint n_iterations) /*!< in: how many times this has been called repeatedly without result: a high value means that we should search farther; if n_iterations < 10, then we search n_iterations / 10 * buf_pool->curr_size pages from the end of the LRU list; if n_iterations < 5, then we will also search n_iterations / 5 of the unzip_LRU list. */ { ibool freed = FALSE; buf_pool_mutex_enter(buf_pool); freed = buf_LRU_free_from_unzip_LRU_list(buf_pool, n_iterations); //这里 if (!freed) { freed = buf_LRU_free_from_common_LRU_list(buf_pool, n_iterations);//这里 } if (!freed) { buf_pool->LRU_flush_ended = 0; } else if (buf_pool->LRU_flush_ended > 0) { buf_pool->LRU_flush_ended--; } buf_pool_mutex_exit(buf_pool); return(freed); }
函数buf_LRU_search_and_free_block
标签:
原文地址:http://www.cnblogs.com/taek/p/4990122.html