函数buf_pool_get

根据space ,offset 获取 buff pool的实例 下标

/******************************************************************//**
Returns the buffer pool instance given space and offset of page
@return buffer pool */
UNIV_INLINE
buf_pool_t*
buf_pool_get(
/*==========*/
    ulint    space,    /*!< in: space id */
    ulint    offset)    /*!< in: offset of the page within space */
{
    ulint    fold;
    ulint    index;
    ulint    ignored_offset;

    ignored_offset = offset >> ; /* 2log of BUF_READ_AHEAD_AREA (64)*/
    fold = buf_page_address_fold(space, ignored_offset);
    index = fold % srv_buf_pool_instances;
    return(&buf_pool_ptr[index]);
}
上一篇:VC中TRACE()的用法


下一篇:angularJs的一次性数据绑定:双冒号::