 };
 
 template <typename TestFunction>
-void benchmark(TestFunction f, size_t max_n = (size_t) 1 << 30, size_t num_iterations = 1)
+void benchmark(TestFunction f, size_t max_n = (size_t) 1 << 30, size_t num_iterations = 100)
 {
     for (size_t n = 1; n <= max_n; n *= 2)
     {


#include <iostream>
#include <iomanip>

struct cudaMalloc_cudaFree
{


int main(void)
{
    std::cout << "malloc() & free()" << std::endl;
    benchmark(malloc_free());

    std::cout << "cudaMalloc() & cudaFree()" << std::endl;
    benchmark(cudaMalloc_cudaFree());
    
