Fix the missing rax itself when estimating Radix tree memory usage

This commit is contained in:
Zongwen Li 2023-08-30 17:12:47 +08:00
parent e792653753
commit 02f12e8860
1 changed files with 1 additions and 1 deletions

View File

@ -987,7 +987,7 @@ char *strEncoding(int encoding) {
* to compress prefixes. */
size_t streamRadixTreeMemoryUsage(rax *rax) {
size_t size = sizeof(*rax);
size = rax->numele * sizeof(streamID);
size += rax->numele * sizeof(streamID);
size += rax->numnodes * sizeof(raxNode);
/* Add a fixed overhead due to the aux data pointer, children, ... */
size += rax->numnodes * sizeof(long)*30;