[t:4127] Closes #4127 Change brtnode_memory_size() to count space allocated for leafentries, not entire mempool.

git-svn-id: file:///svn/toku/tokudb@36825 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Barry Perlman 2013-04-16 23:59:55 -04:00 committed by Yoni Fogel
parent 9051b4736a
commit 47cc40fbf6

View file

@ -571,7 +571,9 @@ brtnode_memory_size (BRTNODE node)
BASEMENTNODE bn = BLB(node, i);
retval += sizeof(*bn);
{
size_t poolsize = toku_mempool_get_size(&bn->buffer_mempool); // include fragmentation overhead
// include fragmentation overhead but do not include space in the
// mempool that has not yet been allocated for leaf entries
size_t poolsize = toku_mempool_get_allocated_space(&bn->buffer_mempool);
invariant (poolsize >= BLB_NBYTESINBUF(node,i));
retval += poolsize;
}