I have not read the sbe code yet (and probably won't, due to a major lack
of experience), but from what I read so far, this seems to suck up a lot of
memory.
I don't think there is a large percentage of code to be changed (and that's
why it is *virtualization* rather than *emulation*) so I think you could
possibly use one page for many meta-pages by recording only the changes,
the same way we use diff files to update our code.
I propose the following data format (only as an indication):
struct PageChange {
u32 PageNumber;
u16 PageOffset; // 0 -> 4095
u8 Action; // 0 = Remove, 1 = Add, 2 = Replace, and so on...
u8 nBytesToReplace; // We probably won't change more than 256 bytes at the
time
u8 *AddedBytes; // Pointer so we can keep a structured table
};
This fits in 12 bytes and can be shrunk down to 8 bytes.
To process this might wastes a couple hundred CPU cycles, but it will only
be called when we need to change the meta-pages.
My opinion
Eric Laberge