Reserve place for 32 modules.
authorMilian Wolff <mail@milianw.de>
Tue, 20 May 2014 08:06:49 +0000 (10:06 +0200)
committerMilian Wolff <mail@milianw.de>
Tue, 20 May 2014 08:06:49 +0000 (10:06 +0200)
malloctrace.cpp

index d04b82b..8fc4cbb 100644 (file)
@@ -134,6 +134,7 @@ struct ThreadData
         bool wasInHandler = in_handler;
         in_handler = true;
         threadRegistry.addThread(this);
+        modules.reserve(32);
 
         string outputFileName = env("DUMP_MALLOC_TRACE_OUTPUT") + to_string(getpid()) + '.' + to_string(thread_id);
         out = fopen(outputFileName.c_str(), "wa");