Commit 0727208a authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:4127] Closes #4127 Change brtnode_memory_size() to count space allocated...

[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
parent 2275d70e
......@@ -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;
}
......
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