[8525, TyTN, MDA Vario II, JasJam Software Upgradin] pof:
What is the Page Pool?

Quoting mamaich:

The large the paging pool is, the more code pages can present in RAM simultaneously -> the less loads from slow ROM -> the faster the device is.

Quoting Mike Calligaro from Windows Mobile Team Blog:

In general terms, there are a number RAM uses that aren't reported in the Memory CPL.

For instance, an OEM might set aside a fair amount of RAM to allow the camera to write directly into it without using the CPU (a DMA buffer). Typically the way they do that is to tell the system there is less than the available RAM and then use the RAM the system doesn't know about.

Another example is something called the "page pool." This is similar to the "page file" on a desktop system, and is heavilly used on NAND systems. The page pool isn't something a user can configure, so there's not much point in showing it in the Memory CPL.

Code that can't be shut down or paged out, especially drivers, isn't shown on that Memory CPL either. There's no reason to show you the RAM the display driver is using, because you can't do anything about it.

Applications use RAM in two ways. There is code that runs, and there is data that is created while it is running. On a NOR device, the code can run directly from the ROM and not be loaded into RAM first. This process is called XIP (eXecute In Place). NAND devices can't XIP, so their code is loaded into RAM and executed from there. If you don't have a Page Pool, this code is loaded into normal RAM. The Page Pool is a mechanism to limit how much code is loaded into normal RAM. With a Page Pool, we can unload code that hasn't been used in a while and reload it later if we need to. We can't do that without a Page Pool.

More information:

http://xdaforums.com/showthread.php?t=276630

http://blogs.msdn.com/windowsmobile/archive/2005/11/17/494177.aspx

http://blogs.msdn.com/windowsmobile/archive/2005/08/19/453784.aspx

How to find the page pool offset on Hermes ROMs?

Take the Hex editor of your choice (I use radare:D) and open OS.nb.

Search the ASCI string "NKKD8", you'll find it two times, take the one more near to the end of the file.

Scroll down a bit until you find the HEXA string "64 00 00 00", page pool should be around there.

If anyone knows a better method please explain :)

Example using OS.nb from WM6 ROM for hermes

We find the second "NKKD8" at offset 0x3B6C90:

offset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF
----------------+----------------------------------------+----------------.
00000000003B6C90 4E4B 4B44 3800 0000 0000 0005 0000 0000 |NKKD8...........|
00000000003B6CA0 00C8 FFFF 8039 2D80 4060 2880 B069 2880 |.....9-.@`(..i(.|
00000000003B6CB0 B869 2880 AC69 2880 144A 0180 805D 2D80 |.i(..i(..J...]-.|
00000000003B6CC0 602A 2D80 1829 0080 0000 0000 0000 0000 |`*-..)..........|

Further down we can find this:

offset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF
----------------+----------------------------------------+----------------.
00000000003B6F40 581D 0480 C41C 0480 BC1C 0480 00B0 0400 |X...............|
00000000003B6F50 FFFF FFFF FFFF FFFF 9B4F FFFF 64B0 0000 |.........O..d...|
[COLOR="Sienna"]00000000003B6F60 6400 0000 A85B 0480 0000 [b]6000[/b] 0000 0000 |d....[....`.....|[/COLOR]
00000000003B6F70 38E8 0180 C43C 0280 DC6B 0180 00B0 0380 |8....<...k......|
00000000003B6F80 882D 0280 FC2C 0280 D488 0480 5489 0480 |.-...,......T...|

So, we can see the page pool is at offset 0x3B6F6B and is set to 6 Mb.

The pagepool value is specified in HEXA, so for example:

Change "6000" to "4000" for a 4Mb paging pool

Change "6000" to "8000" for a 8Mb paging pool

Change "6000" to "C000" for a 12Mb paging pool

Change "6000" to "F000" for a 16Mb paging pool

Finding the best page pool size

The page pool size is a compromise between memory available to programs and speed. On WM6 ROM:

With 4Mb page pool we get a Total Program Memory available of 50.68 Mb, and SPB Benchmark index 347.88.

With 6Mb page pool we get a Total Program Memory available of 48.68 Mb, and SPB Benchmark index 346.03.

With 8Mb page pool we get a Total Program Memory available of 46.67 Mb, and SPB Benchmark index 345.95.

With 12Mb page pool we get a Total Program Memory available of 42.66 Mb, and SPB Benchmark index 348.53.

With 16Mb page pool we get a Total Program Memory available of 39.64 Mb, and SPB Benchmark index 351.26.

I attach the SPB benchmark results, so anyone can take its conclusions :)