Hi Raja Pawn,
I am trying to test the low memory killer driver. I am not able to simulate
it.
On Thursday, November 18, 2010 11:09:03 AM UTC+5:30, Raja Pavan 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);
> }
> }
>
> I am also using the same method to allocate the memory
.
> 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
>
Do we need to set these values when we are booting the device or we can
change the values using adb.
Because as I am modifying these values by echoing, still the lowmem_shrink
is not getting invoked.
>
> 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]
website: http://groups.google.com/group/android-kernel
---
You received this message because you are subscribed to the Google Groups
"Android Linux Kernel Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.