mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
[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:
parent
9051b4736a
commit
47cc40fbf6
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue