[Scummvm-cvs-logs] SF.net SVN: scummvm:[47929] scummvm/trunk/engines/sci/engine/vm.cpp

waltervn at users.sourceforge.net waltervn at users.sourceforge.net
Sat Feb 6 13:50:50 CET 2010


Revision: 47929
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47929&view=rev
Author:   waltervn
Date:     2010-02-06 12:50:50 +0000 (Sat, 06 Feb 2010)

Log Message:
-----------
SCI: Run GC only when execution_stack_base is 0.

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/vm.cpp

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2010-02-06 10:43:54 UTC (rev 47928)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2010-02-06 12:50:50 UTC (rev 47929)
@@ -569,8 +569,16 @@
 
 static void gc_countdown(EngineState *s) {
 	if (s->gc_countdown-- <= 0) {
-		s->gc_countdown = script_gc_interval;
-		run_gc(s);
+		// Only run garbage collection when execution stack base
+		// is zero, as it cannot count references inside kernel
+		// functions
+		if (s->execution_stack_base == 0) {
+			s->gc_countdown = script_gc_interval;
+			run_gc(s);
+		} else {
+			// Try again later
+			s->gc_countdown = 1;
+		}
 	}
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list