CPU/CodeCache: Clear blocks on system shutdown
Means we release all allocated memory on system shutdown, rather than waiting until the next VM/system start.
This commit is contained in:
parent
d0ad4e7264
commit
8bd0e6c3f7
|
@ -225,6 +225,11 @@ void CPU::CodeCache::Reset()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CPU::CodeCache::Shutdown()
|
||||||
|
{
|
||||||
|
ClearBlocks();
|
||||||
|
}
|
||||||
|
|
||||||
void CPU::CodeCache::Execute()
|
void CPU::CodeCache::Execute()
|
||||||
{
|
{
|
||||||
if (IsUsingAnyRecompiler())
|
if (IsUsingAnyRecompiler())
|
||||||
|
|
|
@ -28,6 +28,9 @@ void ProcessShutdown();
|
||||||
/// Flushes the code cache, forcing all blocks to be recompiled.
|
/// Flushes the code cache, forcing all blocks to be recompiled.
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
|
/// Free all non-persistent resources for the code cache.
|
||||||
|
void Shutdown();
|
||||||
|
|
||||||
/// Invalidates all blocks which are in the range of the specified code page.
|
/// Invalidates all blocks which are in the range of the specified code page.
|
||||||
void InvalidateBlocksWithPageIndex(u32 page_index);
|
void InvalidateBlocksWithPageIndex(u32 page_index);
|
||||||
|
|
||||||
|
|
|
@ -1975,6 +1975,7 @@ void System::DestroySystem()
|
||||||
CDROM::Shutdown();
|
CDROM::Shutdown();
|
||||||
g_gpu.reset();
|
g_gpu.reset();
|
||||||
DMA::Shutdown();
|
DMA::Shutdown();
|
||||||
|
CPU::CodeCache::Shutdown();
|
||||||
CPU::PGXP::Shutdown();
|
CPU::PGXP::Shutdown();
|
||||||
CPU::Shutdown();
|
CPU::Shutdown();
|
||||||
Bus::Shutdown();
|
Bus::Shutdown();
|
||||||
|
|
Loading…
Reference in New Issue