sunil_josh1
03-13-2004, 06:08 PM
hi,
i am allocating memory for one and two dimension array using malloc. The whole process is going in side a loop (approx. 16000 time) and every times memory is updating. Therefore it is taking lots of memory space. I am intresed to delete that memory space every times when loop is finised. I tried to assige zero value every time before the process taking place but it is not working.
I also used
free(d);
but this is also not working, where d is:
float *d;
d= (float*)malloc((unsigned)(n*sizeof(float)));
with warm regards,
sunil_josh1
i am allocating memory for one and two dimension array using malloc. The whole process is going in side a loop (approx. 16000 time) and every times memory is updating. Therefore it is taking lots of memory space. I am intresed to delete that memory space every times when loop is finised. I tried to assige zero value every time before the process taking place but it is not working.
I also used
free(d);
but this is also not working, where d is:
float *d;
d= (float*)malloc((unsigned)(n*sizeof(float)));
with warm regards,
sunil_josh1