Results 1 to 2 of 2
Can some one share a test application to test Android Low Memory Killer The test code pated below is not providing the desired functionality. (1) It is not killed at ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-29-2010 #1
- Join Date
- Oct 2007
Android Low Memory Killer
The test code pated below is not providing the desired functionality.
(1) It is not killed at the designated watermark levels. When the free memory in the system is 5632*4*1024 = 22.4 MB
it is killed only when the system memory reaches as low as min_free_kbytes.
system("echo 1536,2048,4096,5120,5632,6144 > /sys/module/lowmemorykiller/parameters/minfree");
sprintf(cmdStr, "echo 13 > /proc/%d/oom_adj", my_pid);
while(i++ < 240) //240 MB Memory
size = 256*1024*sizeof(int); //1MB
ptr[i] = (int *)malloc(size);
size = size/sizeof(int);
//printf("Success in malloc");
printf("malloc error %d ",ptr[i]);
- 12-08-2010 #2
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
Try the Android developers' website/forums for help with this? Yes, Android is a MOSTLY Linux system, but there are a lot of caveats to that statement.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!