Array index is changing here.

This commit is contained in:
Bartosz Taudul 2019-01-31 18:37:59 +01:00
parent 52a7f3a39a
commit e801943b90

View File

@ -3125,8 +3125,7 @@ void Worker::ReconstructMemAllocPlot()
if( aptr != aend && fptr != fend ) if( aptr != aend && fptr != fend )
{ {
auto atime = aptr->timeAlloc; auto atime = aptr->timeAlloc;
const auto& memData = mem.data[*fptr]; auto ftime = mem.data[*fptr].timeFree;
auto ftime = memData.timeFree;
for(;;) for(;;)
{ {
@ -3144,7 +3143,7 @@ void Worker::ReconstructMemAllocPlot()
} }
else else
{ {
usage -= int64_t( memData.size ); usage -= int64_t( mem.data[*fptr].size );
assert( usage >= 0 ); assert( usage >= 0 );
if( max < usage ) max = usage; if( max < usage ) max = usage;
ptr->time = ftime; ptr->time = ftime;
@ -3152,7 +3151,7 @@ void Worker::ReconstructMemAllocPlot()
ptr++; ptr++;
fptr++; fptr++;
if( fptr == fend ) break; if( fptr == fend ) break;
ftime = memData.timeFree; ftime = mem.data[*fptr].timeFree;
} }
} }
} }