MySQL 8.0.40
Source Code Documentation
|
Binary buddy allocator for compressed pages. More...
Functions | |
void * | buf_buddy_alloc_low (buf_pool_t *buf_pool, ulint i) |
Allocate a block. More... | |
void | buf_buddy_free_low (buf_pool_t *buf_pool, void *buf, ulint i, bool has_zip_free) |
Deallocate a block. More... | |
static ulint | buf_buddy_get_slot (ulint size) |
Get the index of buf_pool->zip_free[] for a given block size. More... | |
static byte * | buf_buddy_alloc (buf_pool_t *buf_pool, ulint size) |
Allocate a block. More... | |
static void | buf_buddy_free (buf_pool_t *buf_pool, void *buf, ulint size) |
Deallocate a block. More... | |
Binary buddy allocator for compressed pages.
Created December 2006 by Marko Makela
|
inlinestatic |
Allocate a block.
This function should only be used for allocating compressed page frames. The thread calling this function must hold buf_pool->LRU_list_mutex and must not hold buf_pool->zip_mutex or any block->mutex.
[in,out] | buf_pool | buffer pool in which the page resides |
[in] | size | compressed page size, between UNIV_ZIP_SIZE_MIN and UNIV_PAGE_SIZE |
void * buf_buddy_alloc_low | ( | buf_pool_t * | buf_pool, |
ulint | i | ||
) |
Allocate a block.
[in,out] | buf_pool | buffer pool instance |
[in] | i | index of buf_pool->zip_free[] or BUF_BUDDY_SIZES |
|
inlinestatic |
Deallocate a block.
[in,out] | buf_pool | buffer pool in which the block resides |
[in] | buf | block to be freed, must not be pointed to by the buffer pool |
[in] | size | block size, up to UNIV_PAGE_SIZE |
void buf_buddy_free_low | ( | buf_pool_t * | buf_pool, |
void * | buf, | ||
ulint | i, | ||
bool | has_zip_free | ||
) |
Deallocate a block.
[in] | buf_pool | buffer pool instance |
[in] | buf | block to be freed, must not be pointed to by the buffer pool |
[in] | i | index of buf_pool->zip_free[], or BUF_BUDDY_SIZES |
[in] | has_zip_free | whether has zip_free_mutex |