Hi Abu... > I tried to run the attached code, compiled for an arm target, on the > board. OK, I know nothing about ARM, so forgive me if I make wrong conclusion somewhere. >I didn't checked for /proc/buddyinfo but checked for > /proc/meminfo. It showed out of memory (actually page allocation > failure) after some 30 runs. This was a test application. > With actual applications running on the target, /proc/buddyinfo gives > the following information... > > cat /proc/buddyinfo > Node 0, zone DMA 1 30 13 4 0 0 > 1 0 0 Only DMA zone....ok, that means, you only have smaller than 16 MB of RAM? According to this you have: 1*PAGE_SIZE+30*2*PAGE_SIZE+13*4*PAGE_SIZE+ 4*8*PAGE_SIZE+1*64*PAGE_SIZE= (1+60+52+32+64)*PAGE_SIZE= 209*PAGE_SIZE still a lot...hmmm...what is the page size of your ARM architecture anyway? > In my opinion when I run the actual application there is OOM as page > was reserved beforehand but the actual allocation from Memory Manager > was done at the point of actual usage of the page and since there is > no free page, out of memory condition appeared. As IMHO the page is > actually allocated when the page is used, means some read/write > operation id done on that. Not sure, but I found something interesting. You did two allocations: poarray=(char*)malloc(SIGPAGE); (and) p2=(char*)malloc(100); but you only did single deallocation: free(p2); Thus I suspect, you got memory leak here. regards Mulyadi -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/