Wednesday 18 August 2010

Page faults on resume from suspend with COMPRESSION=on

A short while ago we had a problem on a platform resuming from suspend, a page fault calling a standard function. The function in question was a Registry query function. The fault was tracked down to that fact that when the config.bib specifies compression like:
COMPRESSION=ON
This means that all files are put into the nk.bin image back to back without any space between them, even running the image from RAM most of these files cannot be executed in place as the file aren't aligned on a page boundary, these files need to be copied into ram on a boundary and executed.
In the project above we needed to use the API so a solution was to turn off the COMPRESSION, this increases the NK.BIN size but helps in lower RAM usage and faster response times due to no duplication of files into executable positions.