Is demand paging enabled in linux kernels of Android?

Dave Hylands dhylands at gmail.com
Wed Mar 19 12:30:02 EDT 2014


Hi Sandeep,


On Wed, Mar 19, 2014 at 9:06 AM, manty kuma <mantykuma at gmail.com> wrote:
>
> Thanks david. So my next question was that is it enabled in linux kernel
that android uses. How do i confirm it?

Perhaps put a sleep(30) right at the start of main()

Run your program.
Look at /proc/PID/status

Then when the sleep is finished and your program continues executing, look
at /proc/PID/status again

To do the test properly you'd probably need to generate some code which has
lots of no-ops (maybe a megabytes worth), and look at /proc/PID/status
before and after executing that function.

I think that as more code gets paged in you'll see VmRSS increase. IIRC
VmRSS also includes your heap and stack.

--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140319/0d0669d1/attachment.html 


More information about the Kernelnewbies mailing list