Age | Commit message (Collapse) | Author |
|
There will be no (true positive) malloc addresses in the text segment.
|
|
|
|
Upon exit, the emulator will now print a leak report of any malloc
allocations that are still live and don't have pointers to their base
address anywhere in either another live mallocation, or in one of the
non-malloc-block memory regions.
Note that the malloc-block memory region check is not fully functional
and this will work even better once we get that fixed.
This is pretty cool. :^)
|
|
|
|
We track these separately from regular mmap() regions, as they have
slightly different behaviors.
|
|
To avoid MMU region lookup on every single instruction fetch, we now
cache a raw pointer to the current instruction. This gets automatically
invalidated when we jump somewhere, but as long as we're executing
sequentially, instruction fetches will hit the cache and bypass all
the region lookup stuff.
This is about a ~2x speedup. :^)
|
|
We can now unmap mapped memory, among other things. This is all very
ad-hoc as I'm trying to run UserspaceEmulator inside itself. :^)
|
|
We'll soon want to copy data in and out of the SoftMMU memory space.
|
|
The SoftMMU now receives full X86::LogicalAddress values from SoftCPU.
This allows the MMU to reroute TLS accesses to a special memory region.
The ELF executable's PT_TLS header tells us how to allocate the TLS.
Basically, the GS register points to a magical 4-byte area which has
a pointer to the TCB (thread control block). The TCB lives in normal
flat memory space and is accessed through the DS register.
|
|
|
|
This Emulator sub-object will keep track of all active memory regions
and handle memory read/write operations from the CPU.
A memory region is currently represented by a virtual Region object
that can implement arbitrary behavior by overriding read/write ops.
|