This commit is contained in:
Saturneic 2018-08-03 18:35:10 +08:00
parent 498d988a5e
commit ac54c07010
2 changed files with 2 additions and 2 deletions

View File

@ -355,7 +355,7 @@ unsigned long long calListMemory(List * p_list){
unsigned long long nodes_size = 0LL;
unsigned long long list_size = sizeof(p_list);
while(p_node != NULL){
nodes_size += sizeof(p_node) + sizeof(*p_node->value);
nodes_size += sizeof(p_node);
p_node = p_node->next;
}
return list_size + nodes_size;

View File

@ -222,6 +222,6 @@ unsigned long long calTreeMemory(Tree *p_tree){
}
int _doCalTreeMemory(TNode *p_tnode, unsigned long long height){
tnodes_size += sizeof(p_tnode) + sizeof(*p_tnode->value);
tnodes_size += sizeof(p_tnode);
return 0;
}