InnoDB Plugin
1.0
|
Functions | |
UNIV_INTERN void * | buf_buddy_alloc_low (buf_pool_t *buf_pool, ulint i, ibool *lru)) |
UNIV_INTERN void | buf_buddy_free_low (buf_pool_t *buf_pool, void *buf, ulint i)) |
UNIV_INLINE ulint | buf_buddy_get_slot (ulint size) |
UNIV_INLINE byte * | buf_buddy_alloc (buf_pool_t *buf_pool, ulint size, ibool *lru) |
UNIV_INLINE void | buf_buddy_free (buf_pool_t *buf_pool, void *buf, ulint size) |
Binary buddy allocator for compressed pages
Created December 2006 by Marko Makela
UNIV_INLINE byte* buf_buddy_alloc | ( | buf_pool_t * | buf_pool, |
ulint | size, | ||
ibool * | lru | ||
) |
Allocate a block. The thread calling this function must hold buf_pool->mutex and must not hold buf_pool->zip_mutex or any block->mutex. The buf_pool->mutex may be released and reacquired. This function should only be used for allocating compressed page frames.
buf_pool | in/out: buffer pool in which the page resides |
size | in: compressed page size (between UNIV_ZIP_SIZE_MIN and UNIV_PAGE_SIZE) |
lru | in: pointer to a variable that will be assigned TRUE if storage was allocated from the LRU list and buf_pool->mutex was temporarily released |
UNIV_INTERN void* buf_buddy_alloc_low | ( | buf_pool_t * | buf_pool, |
ulint | i, | ||
ibool * | lru | ||
) |
Allocate a block. The thread calling this function must hold buf_pool->mutex and must not hold buf_pool->zip_mutex or any block->mutex. The buf_pool_mutex may be released and reacquired.
buf_pool | in/out: buffer pool instance |
i | in: index of buf_pool->zip_free[], or BUF_BUDDY_SIZES |
lru | in: pointer to a variable that will be assigned TRUE if storage was allocated from the LRU list and buf_pool->mutex was temporarily released |
UNIV_INLINE void buf_buddy_free | ( | buf_pool_t * | buf_pool, |
void * | buf, | ||
ulint | size | ||
) |
Deallocate a block.
buf_pool | in/out: buffer pool in which the block resides |
buf | in: block to be freed, must not be pointed to by the buffer pool |
size | in: block size, up to UNIV_PAGE_SIZE |
UNIV_INTERN void buf_buddy_free_low | ( | buf_pool_t * | buf_pool, |
void * | buf, | ||
ulint | i | ||
) |
Deallocate a block.
buf_pool | in: buffer pool instance |
buf | in: block to be freed, must not be pointed to by the buffer pool |
i | in: index of buf_pool->zip_free[], or BUF_BUDDY_SIZES |
UNIV_INLINE ulint buf_buddy_get_slot | ( | ulint | size | ) |
Get the index of buf_pool->zip_free[] for a given block size.
size | in: block size |