Hi, ----- Original Message ----- > From: "Justin Lebar" <justin.le...@gmail.com> > To: "Norbert Lindenberg" <mozillali...@lindenbergsoftware.com> > Cc: "Benjamin Smedberg" <benja...@smedbergs.us>, > dev-platform@lists.mozilla.org > Sent: Monday, December 3, 2012 7:54:34 PM > Subject: Re: Integrating ICU into Mozilla build > > > Is all code loaded into memory as one lump on B2G, or is it paged > > in as needed? There may be quite a bit of code in there that's not > > commonly needed. > > I don't know how it works, to be honest. I can't imagine that > library > pages are loaded only on demand with no pre-fetching, since that > would > be slow. And I imagine once a code page is in memory it's not going > out. Our devices don't have swap, and I've never observed them > dropping clean code pages (which don't have to go into a swap file) > to > make room for data.
I'm pretty sure that the library pages are brought in on a demand basis, although I also seem to recall that the kernel also does some read-ahead. The pages that are paged in become the actual code that is run, so I'm pretty sure that they don't get released, but conceptually there's no reason why it couldn't. I dug around a bit and came up with this paper which gives some background on the algorithms used in the kernel. http://landley.net/kdocs/ols/2007/ols2007v2-pages-273-284.pdf Dave Hylands _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform