Memory allocation time problem

Hi,

I have question/problem - when program run, first time are very big than the others. Is this problem with the allocate memory on device?

#include <stdio.h>

#include <stdlib.h>

#include <cutil_inline.h>

void test(int i)

{

	unsigned int timer = 0;

	bool *a;

	cutCreateTimer(&timer);

	cutStartTimer(timer);

	

	cudaMalloc( (void**)&a , 1);

	cudaThreadSynchronize();

	cudaFree(a);	

	cutStopTimer( timer);

	printf("Time %i: %f (ms)\n", i, cutGetTimerValue( timer));

	cutDeleteTimer( timer);

}

int main()

{

	for(int x=0;x<10;x++)

		test(x);

	return 1;

}

Results:

Time 0: 93.683044 (ms)

Time 1: 0.423039 (ms)

Time 2: 0.411558 (ms)

Time 3: 0.390508 (ms)

Time 4: 0.394750 (ms)

Time 5: 0.385538 (ms)

Time 6: 0.385568 (ms)

Time 7: 0.437777 (ms)

Time 8: 0.390998 (ms)

Time 9: 0.404124 (ms)

How can i resove this problem? Suggestions? Please help!

This problem was mentioned many times, here you have solution: http://forums.nvidia.com/index.php?showtopic=185733

Ok, but ther is no solution in The Official NVIDIA Forums | NVIDIA
I use WinXP - SP3, GTS 250 VS2008/2010 and Win7, GT 420M, VS2008/2010

Help!

The first CUDA call initializes the contxt, which takes time.
93ms is almost unnoticeable to a user, why complain?