From ac54c07010b76b476be6a93d59b818343900a6be Mon Sep 17 00:00:00 2001 From: Saturneic Date: Fri, 3 Aug 2018 18:35:10 +0800 Subject: [PATCH] Fixed --- list/list_expand.c | 2 +- tree/tree_expand.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/list/list_expand.c b/list/list_expand.c index 84b8157..e0cf001 100644 --- a/list/list_expand.c +++ b/list/list_expand.c @@ -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; diff --git a/tree/tree_expand.c b/tree/tree_expand.c index 48e891a..e188663 100644 --- a/tree/tree_expand.c +++ b/tree/tree_expand.c @@ -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; }