 
 static void benchmark(const QueueList& queues, const BufferPtr& buffer, const Settings& settings, size_t blockSize)
 {
-    std::vector<Times> times;
+    Times times[queues.size()];
     thread threads[queues.size()];
 
     if (settings.cudaDevice == -1)

                cudaFree(bufferPtr);
            }
            throw runtime_error("Unable to verify random blocks!");
            break;
    }

    free(ptr);


    for (size_t i = 0; i < queues.size(); ++i)
    {
        Times* t = &times[i];
        QueuePtr q = queues[i];

        //threads[i] = thread(measure, &queues[i], &buffer, &times[i], &settings, &barrier);
        threads[i] = thread([&q, &buffer, t, &settings, &barrier] {
            measure(q, buffer, t, settings, &barrier);
        });
    }

