Memory Models - nonarkitten/monkeymonkeyjit GitHub Wiki

There are two basic methods of accessing memory; flat and paged.

Flat Memory Model

The flat memory model uses a single 16MB block of host memory for everything -- ROM, RAM and IO. This greatly simplifies the JIT since most addressing modes can be altered in-place while leaving all other opcodes alone and not needing any additional registers, but complicates bankswitching and could be considered a little wasteful on systems that often had KILOBYTES of RAM and not MEGABYTES of it.

Paged Memory Model

With paged memory, the entire 16MB memory space is split into 256 regions that are 64KB each. All memory operations will need to indirectly look up the page address which will impact performance. However, the paged model is required on systems with memory mirroring and makes banksiwtching and code checking faster.