Commit b5fb7cd1 authored by marko's avatar marko

branches/zip: Rename buf_buddy_alloc_free() to buf_buddy_alloc() and

buf_buddy_alloc_free_low() to buf_buddy_alloc_low().
parent 0d5f0ab7
...@@ -18,8 +18,8 @@ Created December 2006 by Marko Makela ...@@ -18,8 +18,8 @@ Created December 2006 by Marko Makela
Try to allocate a block from buf_pool->zip_free[]. */ Try to allocate a block from buf_pool->zip_free[]. */
void* void*
buf_buddy_alloc_free_low( buf_buddy_alloc_low(
/*=====================*/ /*================*/
/* out: allocated block, or NULL /* out: allocated block, or NULL
if buf_pool->zip_free[] was empty */ if buf_pool->zip_free[] was empty */
ulint i, /* in: index of buf_pool->zip_free[] */ ulint i, /* in: index of buf_pool->zip_free[] */
...@@ -40,10 +40,10 @@ buf_buddy_alloc_free_low( ...@@ -40,10 +40,10 @@ buf_buddy_alloc_free_low(
UT_LIST_REMOVE(list, buf_pool->zip_free[i], bpage); UT_LIST_REMOVE(list, buf_pool->zip_free[i], bpage);
} else if (split && i + 1 < BUF_BUDDY_SIZES) { } else if (split && i + 1 < BUF_BUDDY_SIZES) {
bpage = buf_buddy_alloc_free_low(i + 1, split); bpage = buf_buddy_alloc_low(i + 1, split);
if (bpage) { if (bpage) {
buf_page_t* buddy = bpage + BUF_BUDDY_LOW << i; buf_page_t* buddy = bpage + (BUF_BUDDY_LOW << i);
UT_LIST_ADD_FIRST(list, buf_pool->zip_free[i], buddy); UT_LIST_ADD_FIRST(list, buf_pool->zip_free[i], buddy);
} }
......
...@@ -45,8 +45,8 @@ buf_buddy_get_slot( ...@@ -45,8 +45,8 @@ buf_buddy_get_slot(
Try to allocate a block from buf_pool->zip_free[]. */ Try to allocate a block from buf_pool->zip_free[]. */
UNIV_INLINE UNIV_INLINE
void* void*
buf_buddy_alloc_free( buf_buddy_alloc(
/*=================*/ /*============*/
ulint size, /* in: block size, up to UNIV_PAGE_SIZE / 2 */ ulint size, /* in: block size, up to UNIV_PAGE_SIZE / 2 */
ibool split) /* in: TRUE=attempt splitting, ibool split) /* in: TRUE=attempt splitting,
FALSE=try to allocate exact size */ FALSE=try to allocate exact size */
......
...@@ -18,8 +18,8 @@ Created December 2006 by Marko Makela ...@@ -18,8 +18,8 @@ Created December 2006 by Marko Makela
Try to allocate a block from buf_pool->zip_free[]. */ Try to allocate a block from buf_pool->zip_free[]. */
void* void*
buf_buddy_alloc_free_low( buf_buddy_alloc_low(
/*=====================*/ /*================*/
/* out: allocated block, or NULL /* out: allocated block, or NULL
if buf_pool->zip_free[] was empty */ if buf_pool->zip_free[] was empty */
ulint i, /* in: index of buf_pool->zip_free[] */ ulint i, /* in: index of buf_pool->zip_free[] */
...@@ -70,8 +70,8 @@ buf_buddy_get_slot( ...@@ -70,8 +70,8 @@ buf_buddy_get_slot(
Try to allocate a block from buf_pool->zip_free[]. */ Try to allocate a block from buf_pool->zip_free[]. */
UNIV_INLINE UNIV_INLINE
void* void*
buf_buddy_alloc_free( buf_buddy_alloc(
/*=================*/ /*============*/
ulint size, /* in: block size, up to UNIV_PAGE_SIZE / 2 */ ulint size, /* in: block size, up to UNIV_PAGE_SIZE / 2 */
ibool split) /* in: TRUE=attempt splitting, ibool split) /* in: TRUE=attempt splitting,
FALSE=try to allocate exact size */ FALSE=try to allocate exact size */
...@@ -80,7 +80,7 @@ buf_buddy_alloc_free( ...@@ -80,7 +80,7 @@ buf_buddy_alloc_free(
ut_a(mutex_own(&buf_pool->mutex)); ut_a(mutex_own(&buf_pool->mutex));
#endif /* UNIV_SYNC_DEBUG */ #endif /* UNIV_SYNC_DEBUG */
return(buf_buddy_alloc_free_low(buf_buddy_get_slot(size), split)); return(buf_buddy_alloc_low(buf_buddy_get_slot(size), split));
} }
#ifdef UNIV_MATERIALIZE #ifdef UNIV_MATERIALIZE
......
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