Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

Investigate whether 'unused' memory areas can safely be ignored #77

Open
kendalharland opened this issue Feb 24, 2017 · 0 comments
Open
Labels

Comments

@kendalharland
Copy link
Collaborator

kendalharland commented Feb 24, 2017

We could forgo allocating 7 unused memory areas if this is the case. This would offer a slight speed up for our tests and slightly faster emulator startup.

The addresses would have to be mapped according to their true offsets to protect the rest of the emulator. e.g:

class MemoryMap {
    final ByteBuffer _buffer = new Uint8List(MEMORY_SIZE_WITHOUT_UNUSED_AREAS).buffer;
    ...
}

MemoryBlock internalWorkBlock(ByteBuffer b) => 
    new MemoryBlock(
        b,
        0x2000000 - SIZEOF_UNUSED_AREA_1,
        0x203ffff - SIZEOF_UNUSED_AREA_1
    ); 
    ... 

and so on. This may not be worth the trouble, or possible, but worth investigating sometime later.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant