mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 16:55:09 +00:00
UserspaceEmulator: Keep Emulator& closer to the action in some places
This avoids the cost of calling Emulator::the() in some very hot paths.
This commit is contained in:
parent
d14695f823
commit
1965fc5b98
9 changed files with 127 additions and 70 deletions
|
@ -72,9 +72,10 @@ Emulator& Emulator::the()
|
|||
|
||||
Emulator::Emulator(const Vector<String>& arguments, const Vector<String>& environment, NonnullRefPtr<ELF::Loader> elf)
|
||||
: m_elf(move(elf))
|
||||
, m_mmu(*this)
|
||||
, m_cpu(*this)
|
||||
{
|
||||
m_malloc_tracer = make<MallocTracer>();
|
||||
m_malloc_tracer = make<MallocTracer>(*this);
|
||||
ASSERT(!s_the);
|
||||
s_the = this;
|
||||
setup_stack(arguments, environment);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue