mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
branches/zip: buf_buddy_free_low(): Use a byte pointer in arithmetics.
buf_buddy_get(): Document that "page" should be a pointer to char or byte.
This commit is contained in:
parent
be0832471b
commit
88c6f95b59
2 changed files with 4 additions and 2 deletions
|
@ -447,7 +447,8 @@ buddy_free:
|
|||
}
|
||||
|
||||
/* Try to relocate the buddy of the free block to buf. */
|
||||
buddy = buf_buddy_get(bpage, BUF_BUDDY_LOW << i);
|
||||
buddy = (buf_page_t*) buf_buddy_get(((byte*) bpage),
|
||||
BUF_BUDDY_LOW << i);
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
{
|
||||
|
|
|
@ -29,7 +29,8 @@ buf_buddy_get_offset(
|
|||
__attribute__((nonnull));
|
||||
|
||||
/**************************************************************************
|
||||
Get the buddy of a compressed page frame. */
|
||||
Get the buddy of a compressed page frame.
|
||||
Note: "page" should be a pointer to byte or char. */
|
||||
#define buf_buddy_get(page,size) ((page) + buf_buddy_get_offset((page),(size)))
|
||||
|
||||
/**************************************************************************
|
||||
|
|
Loading…
Reference in a new issue