MySQL 8.4.2
Source Code Documentation
|
Binary buddy allocator for compressed pages. More...
Go to the source code of this file.
Functions | |
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... | |
bool | buf_buddy_realloc (buf_pool_t *buf_pool, void *buf, ulint size) |
Try to reallocate a block. More... | |
void | buf_buddy_condense_free (buf_pool_t *buf_pool) |
Combine all pairs of free buddies. 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_condense_free | ( | buf_pool_t * | buf_pool | ) |
Combine all pairs of free buddies.
[in] | buf_pool | buffer pool instance |
|
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 |
bool buf_buddy_realloc | ( | buf_pool_t * | buf_pool, |
void * | buf, | ||
ulint | size | ||
) |
Try to reallocate a block.
[in] | buf_pool | buffer pool instance |
[in] | buf | block to be reallocated, must be pointed to by the buffer pool |
[in] | size | block size, up to UNIV_PAGE_SIZE |
true | if succeeded or if failed because the block was fixed |
false | if failed because of no free blocks. |