Reputation: 71
Below is the written code I am executing in nsight eclipse
and Netbeans
. I am getting different memory allocation size. I am not able to understand why it is happening. If anyone has any clue please help.
int main()
{
cuComplex *a,*b;
float *c;
double mfree,mtotal;
size_t mem1,mem2;
int Size = 8192;
cudaMalloc((void**)&a,sizeof(cuComplex)*Size*Size);
cudaMalloc((void**)&b,sizeof(cuComplex)*Size*Size);
cudaMalloc((void**)&c,sizeof(float)*Size*Size);
cudaMemGetInfo(&mem1,&mem2);
mfree = (double)mem1/1024*1024;
mtotal = (double)mem2/1024*1024;
printf("Total memory = %f and Free Memory = %f",mtotal,mfree);
}
Below is the output in both platforms
Output in Nsight Eclipse
Total memory = 2001.8125 and Free Memory = 105.625
Output in Netbeans
Total memory = 2001.8125 and Free Memory = 572.125
Upvotes: 2
Views: 100