Hi all,

I compiled a malloc test code with MinGW-3.10.0-1 / gcc-3.2.3 and with
MS Visual C++ 6.

With MinGW/gcc time gives:

real    0m3.718s
user   0m0.015s
sys    0m0.000s

and With MS Visual C++:

real    0m2.094s
user   0m0.015s
sys    0m0.000s

The source code of the test program is:

#include <stdlib.h>
int main()
{
  int i,*a;
  for(i=0;i<20000000;i++){
    a=malloc(sizeof(int));
    free(a);
  }
  return 0;
}

I Compiled it with:

gcc -funroll-loops -O3 -o t_malloc t_malloc.c

and in Visual C++ with the "Release" configuration.

Am I omissing any optimization option with gcc??

Thanks in advance

Marco