Manjeet, That's interesting... I am not quite sure 'free' and 'proc/mem/info' include any sensitive information for your company. If you stored your last sales figures in those files, believe me, it is a wrong wrong idea... Also it is probably against your company policy to expose your problems on this mail thread. Did you think about it?
Anyway, since you don't want a specific answer, you'll get a generic one. Have a look to the excellent site: http://www.linuxatemyram.com/ including the experiments: http://www.linuxatemyram.com/play.html Emeric On Thu, Jan 17, 2013 at 8:59 AM, Manjeet Pawar <mpchapmanj...@gmail.com>wrote: > @Emric...I would have do that , but I am sorry I can't do > anything against of company policy... > > But u can do @ ur side... > Write a simple program and do malloc and memset in while(1) , it will give > u OOM (if u have enabled it or if u have applied OOM patch)... > > then you can checkout all the information printed by OOM..and I have tried > more than 2-3 applications, but couldn't calculate the exact memory usage . > > Initially I got this problem when I was using browser, when I try to open > the link , I got OOM...then I tried to calculate amount to free memory and > used memory , I found that a large chunk of memory (200MB approx) was used > by some other processes. then i tried with other small programs and get OOM > for them, but thing is for every program there is always some memory > confusion(who used extras memory).... > > yeah I do cat /proc/meminfo also....when I do malloc and memset , in > meminfo I found that inactive pages has grown up, in meminfo I can > mainupulate memory calculations easily and i got correct results... > > But in case of running browser on my target board I am needing to know > where is rest of memory going when it is required by my browser. > > Thanks > > > On Thu, Jan 17, 2013 at 4:15 AM, Emeric VIGIER <emeric.vig...@gmail.com>wrote: > >> Can you make a print of what returns "free" command and /process/meminfo? >> It would help us target our answer to your specific example. >> >> Emeric >> Le 17 janv. 2013 04:10, "Manjeet Pawar" <mpchapmanj...@gmail.com> a >> écrit : >> >>> Hi all, >>> >>> I have a issue regarding memory . >>> >>> I ran a program on my board that continuously do malloc and write some >>> data at that memory location and put this code in while loop. it ran for >>> some >>> time untill it consume the whole of the memory and then given a OOM. >>> where we get information about the memory consumed and free memory. >>> >>> But when i adds up the userspace memory and kernel memory which gives >>> total used memory and I know the total free memory available(cat >>> /proc/meminfo)...But I get the free memory available much lesse than the >>> expected value. >>> >>> I am confused where is the rest of memory . >>> >>> I adds user space memory=active anon+ inactive anon+ active file + >>> inactive file >>> >>> and kernel memory usage is =slab reclaimable and slab unreclaimable + >>> kernel stack+page tables >>> >>> this give the total memory used. But when I subtract this total used >>> memory from the total available memory , a large chunk should be free, but >>> practically after getting OOM I am leaving with a small memory >>> >>> ANY IDEA, who consumed the rest of the memory. >>> >>> Regards >>> Manjeet >>> >>> -- >>> unsubscribe: android-kernel+unsubscr...@googlegroups.com >>> website: http://groups.google.com/group/android-kernel >> >> -- >> unsubscribe: android-kernel+unsubscr...@googlegroups.com >> website: http://groups.google.com/group/android-kernel > > > -- > unsubscribe: android-kernel+unsubscr...@googlegroups.com > website: http://groups.google.com/group/android-kernel > -- unsubscribe: android-kernel+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-kernel