memory tracer - fix memory accumulation of children

This commit is contained in:
Matthias Hochsteger 2020-11-25 14:34:29 +01:00
parent b55264e0ee
commit 91f127ef71

View File

@ -1068,10 +1068,9 @@ namespace ngcore
{
// reverse topological order to accumulate total memory usage of all children
auto i = sorting[sorting.Size()-1-i_];
if(parents[i]==-1)
root.size += nodes[i]->size;
else
nodes[parents[i]]->size += nodes[i]->size;
if(i==0)
continue;
nodes[parents[i]]->size += nodes[i]->size;
}
WriteSunburstHTML( root, fname, false );