Re: freeing memory

2000-10-22 Thread Horst von Brand
[EMAIL PROTECTED] said: > i am allocating some 1000 bytes of memory as folows > > f_malloc() > { > . > for (i=1 to 10) > { > size = 1000; > pAddr[i] = (unsigned long) kmalloc(size, GFP_DMA | GFP_BUFFER); > } > ... > } You don't check if you got the memory (

Re: freeing memory

2000-10-22 Thread Marcus Sundberg
[EMAIL PROTECTED] writes: > hi, > > i am allocating some 1000 bytes of memory as folows > > f_malloc() > { > . > for (i=1 to 10) > { > size = 1000; > pAddr[i] = (unsigned long) kmalloc(size, GFP_DMA | GFP_BUFFER); [snip] > pAddr is defined as 'unsigned long pAddr[

Re: freeing memory

2000-10-22 Thread Bordi Zhou
It's not a fault of kernel, it's just a mistake. you should use for(i=0 to 9) pAddr[10] only has a range of 0 to 9. miic> f_malloc() miic> { miic> . miic> for (i=1 to 10) miic> { miic> size = 1000; miic> pAddr[i] = (unsigned long) kmalloc(size, GFP_DMA | GFP_BUFFER);