Closes #1969 closes[t:1969] Fix assertion in round_to_page

git-svn-id: file:///svn/toku/tokudb@14570 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Yoni Fogel 2013-04-16 23:58:02 -04:00
parent 191d616ee8
commit a5cf59455a

View file

@ -42,7 +42,7 @@ round_to_page (size_t size) {
const size_t result = PAGE_SIZE+((size-1)&~(PAGE_SIZE-1)); const size_t result = PAGE_SIZE+((size-1)&~(PAGE_SIZE-1));
assert(0==(result&(PAGE_SIZE-1))); // make sure it's aligned assert(0==(result&(PAGE_SIZE-1))); // make sure it's aligned
assert(result>=size); // make sure it's not too small assert(result>=size); // make sure it's not too small
assert(size<result+PAGE_SIZE); // make sure we didn't grow by more than a page. assert(result<size+PAGE_SIZE); // make sure we didn't grow by more than a page.
return result; return result;
} }