Reserve space for thread map, list.

This commit is contained in:
Bartosz Taudul 2019-11-15 22:44:36 +01:00
parent 18fd928a9d
commit db930f7f93

View File

@ -645,6 +645,8 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
lockmap.timeAnnounce = lockmap.timeTerminate = 0; lockmap.timeAnnounce = lockmap.timeTerminate = 0;
} }
f.Read( tsz ); f.Read( tsz );
lockmap.threadMap.reserve( tsz );
lockmap.threadList.reserve( tsz );
for( uint64_t i=0; i<tsz; i++ ) for( uint64_t i=0; i<tsz; i++ )
{ {
uint64_t t; uint64_t t;