/[pcsx2_0.9.7]/trunk/pcsx2/System/SysCoreThread.cpp
ViewVC logotype

Diff of /trunk/pcsx2/System/SysCoreThread.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/pcsx2/System/SysCoreThread.cpp	2010/12/23 11:48:33	279
+++ trunk/pcsx2/System/SysCoreThread.cpp	2010/12/23 12:02:12	280
@@ -22,9 +22,9 @@
 #include "GS.h"
 #include "Elfheader.h"
 #include "Patch.h"
-#include "PageFaultSource.h"
 #include "SysThreads.h"
 
+#include "Utilities/PageFaultSource.h"
 #include "Utilities/TlsVariable.inl"
 
 #ifdef __WXMSW__
@@ -111,13 +111,24 @@
 	Hle_SetElfPath(elf.ToUTF8());
 }
 
-void SysCoreThread::Reset()
+// Performs a quicker reset that does not deallocate memory associated with PS2 virtual machines
+// or cpu providers (recompilers).
+void SysCoreThread::ResetQuick()
 {
 	Suspend();
+
 	m_resetVirtualMachine	= true;
 	m_hasActiveMachine		= false;
 }
 
+void SysCoreThread::Reset()
+{
+	ResetQuick();
+	GetVmMemory().DecommitAll();
+	SysClearExecutionCache();
+}
+
+
 // Applies a full suite of new settings, which will automatically facilitate the necessary
 // resets of the core and components (including plugins, if needed).  The scope of resetting
 // is determined by comparing the current settings against the new settings, so that only
@@ -159,6 +170,8 @@
 	// because of changes to the TLB.  We don't actually support the TLB, however, so rec
 	// resets aren't in fact *needed* ... yet.  But might as well, no harm.  --air
 
+	GetVmMemory().CommitAll();
+
 	if( m_resetVirtualMachine || m_resetRecompilers || m_resetProfilers )
 	{
 		SysClearExecutionCache();

 

  ViewVC Help
Powered by ViewVC 1.1.22