Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup memory manager #4

Open
momo5502 opened this issue Sep 5, 2024 · 1 comment
Open

Cleanup memory manager #4

momo5502 opened this issue Sep 5, 2024 · 1 comment
Labels
maintenance Changes that don't extend capabilities

Comments

@momo5502
Copy link
Owner

momo5502 commented Sep 5, 2024

This is tightly coupled to #14.
Currently, the emulator interface inherits the memory_manager interface. That's bad. The memory_manager implements windows specific functionality and should thus be part of the windows_emulator.

@momo5502
Copy link
Owner Author

momo5502 commented Nov 18, 2024

The emulator interface would therefore need to expose the 3 requried APIs:

virtual void map_memory(uint64_t address, size_t size, memory_permission permissions) = 0;
virtual void unmap_memory(uint64_t address, size_t size) = 0;
virtual void apply_memory_protection(uint64_t address, size_t size, memory_permission permissions) = 0;

A consequence would be that this introduces a level of abstraction by moving things to the windows_emulator. Thus requiring a second level of virtual function calls. That's bad. CRTP should be the solution to this, to eliminate at least one level of virtual calls.

@momo5502 momo5502 added the maintenance Changes that don't extend capabilities label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Changes that don't extend capabilities
Projects
None yet
Development

No branches or pull requests

1 participant