标签:
#define FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID 34
/**********************************************************************//** Gets the space id, page offset, and byte offset within page of a pointer pointing to a buffer frame containing a file page. */ UNIV_INLINE void buf_ptr_get_fsp_addr( /*=================*/ const void* ptr, /*!< in: pointer to a buffer frame */ ulint* space, /*!< out: space id */ fil_addr_t* addr) /*!< out: page offset and byte offset */ { const page_t* page = (const page_t*) ut_align_down(ptr, UNIV_PAGE_SIZE); *space = mach_read_from_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); addr->page = mach_read_from_4(page + FIL_PAGE_OFFSET); addr->boffset = ut_align_offset(ptr, UNIV_PAGE_SIZE); }
标签:
原文地址:http://www.cnblogs.com/taek/p/4989108.html