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()
|
||||
{
|
||||
if (IsUsingAnyRecompiler())
|
||||
|
|
|
@ -28,6 +28,9 @@ void ProcessShutdown();
|
|||
/// Flushes the code cache, forcing all blocks to be recompiled.
|
||||
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.
|
||||
void InvalidateBlocksWithPageIndex(u32 page_index);
|
||||
|
||||
|
|
|
@ -1975,6 +1975,7 @@ void System::DestroySystem()
|
|||
CDROM::Shutdown();
|
||||
g_gpu.reset();
|
||||
DMA::Shutdown();
|
||||
CPU::CodeCache::Shutdown();
|
||||
CPU::PGXP::Shutdown();
|
||||
CPU::Shutdown();
|
||||
Bus::Shutdown();
|
||||
|
|
Loading…
Reference in New Issue