Commit 12682d42 authored by marko's avatar marko

branches/zip: Introduce the constant BUF_BUDDY_HIGH.

parent b5fb7cd1
...@@ -39,7 +39,7 @@ buf_buddy_get_offset( ...@@ -39,7 +39,7 @@ buf_buddy_get_offset(
{ {
ut_ad(ut_is_2pow(size)); ut_ad(ut_is_2pow(size));
ut_ad(size >= BUF_BUDDY_LOW); ut_ad(size >= BUF_BUDDY_LOW);
ut_ad(size < BUF_BUDDY_LOW << BUF_BUDDY_SIZES); ut_ad(size < BUF_BUDDY_HIGH);
if (((ulint) page) & size) { if (((ulint) page) & size) {
return(-(lint) size); return(-(lint) size);
......
...@@ -1171,8 +1171,8 @@ struct buf_pool_struct{ ...@@ -1171,8 +1171,8 @@ struct buf_pool_struct{
/* unmodified compressed pages */ /* unmodified compressed pages */
UT_LIST_BASE_NODE_T(buf_page_t) zip_free[BUF_BUDDY_SIZES]; UT_LIST_BASE_NODE_T(buf_page_t) zip_free[BUF_BUDDY_SIZES];
/* buddy free lists */ /* buddy free lists */
#if BUF_BUDDY_LOW << BUF_BUDDY_SIZES != UNIV_PAGE_SIZE #if BUF_BUDDY_HIGH != UNIV_PAGE_SIZE
# error "BUF_BUDDY_LOW << BUF_BUDDY_SIZES != UNIV_PAGE_SIZE" # error "BUF_BUDDY_HIGH != UNIV_PAGE_SIZE"
#endif #endif
#if BUF_BUDDY_LOW > PAGE_ZIP_MIN_SIZE #if BUF_BUDDY_LOW > PAGE_ZIP_MIN_SIZE
# error "BUF_BUDDY_LOW > PAGE_ZIP_MIN_SIZE" # error "BUF_BUDDY_LOW > PAGE_ZIP_MIN_SIZE"
......
...@@ -43,5 +43,10 @@ enum buf_io_fix { ...@@ -43,5 +43,10 @@ enum buf_io_fix {
# define BUF_BUDDY_SIZES 7 # define BUF_BUDDY_SIZES 7
#endif #endif
/* twice the maximum block size of the buddy system;
the underlying memory is aligned by this amount:
this must be equal to UNIV_PAGE_SIZE */
#define BUF_BUDDY_HIGH (BUF_BUDDY_LOW << BUF_BUDDY_SIZES)
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment