What oom_adj is your test app running under?
On Wed, Nov 17, 2010 at 9:39 PM, Raja Pavan <[email protected]> wrote:
> We are testing the lowmemorykiller.c driver of android, using a sample
> test application that malloc() and memset() memory. [code pasted
> below]
>
> void loopmalloc()
> {
> int size,i=0;
> float **ptr = NULL;
>
> printf("\n\nLoopMalloc starts....\n\n");
> ptr = (float **)malloc(2000000*sizeof(float *));
> while(i++ < 2000000)
> {
> printf("LoopMalloc Starts i=%d\n",i);
> size = 1024*1024*1024*sizeof(float);
> ptr[i] = (float *)malloc(size);
> memset(ptr[i],0,size);
> }
> }
>
> We configured lowmemorykiller.c to be triggrred for 6 different levels
> of freememory
>
> init.rc
> write /sys/module/lowmemorykiller/parameters/minfree
> 1536,2048,4096,5120,5632,6144
>
> Low Memory Killer was not tiggerred for any level of the freememory
> mentioned above.
>
> Then we increased the Free Memory Levels, so the sample application is
> expected to be triggered at the very beginning as we have configured
> the LMK to be triggered even for a very high free memory.
>
> write /sys/module/lowmemorykiller/parameters/minfree
> 1054720,1054720,1054720,1054720,1054720,1054720
>
> Now the low memory killer is getting called and also the sample test
> application is killed by the lowmemorykiller.
>
> But only after the sample application is almost at the end of the
> memory allocation.
>
> Is there any patch to lowmemorykiller.c or the kswapd (mm/vmscan.c)
> that will make the lowmemorykiller to get triggerred for all levels of
> the free memory levels specified inside the init.rc.
>
> --
> unsubscribe:
> [email protected]<android-kernel%[email protected]>
> website: http://groups.google.com/group/android-kernel
>
--
Dianne Hackborn
Android framework engineer
[email protected]
Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails. All such
questions should be posted on public forums, where I and others can see and
answer them.
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-kernel