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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Jun 23 19:30:18 CEST 2010


Revision: 50188
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50188&view=rev
Author:   thebluegr
Date:     2010-06-23 17:30:18 +0000 (Wed, 23 Jun 2010)

Log Message:
-----------
Fixed memory fragmentation warnings in Crazy Nick's games

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

Modified: scummvm/trunk/engines/sci/engine/kmisc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmisc.cpp	2010-06-23 17:05:54 UTC (rev 50187)
+++ scummvm/trunk/engines/sci/engine/kmisc.cpp	2010-06-23 17:30:18 UTC (rev 50188)
@@ -105,7 +105,11 @@
 };
 
 reg_t kMemoryInfo(EngineState *s, int argc, reg_t *argv) {
-	const uint16 size = 0x7fff;  // Must not be 0xffff, or some memory calculations will overflow
+	// The free heap size returned must not be 0xffff, or some memory
+	// calculations will overflow. Crazy Nick's games handle up to 32746
+	// bytes (0x7fea), otherwise they throw a warning that the memory is
+	// fragmented
+	const uint16 size = 0x7fea;
 
 	switch (argv[0].offset) {
 	case K_MEMORYINFO_LARGEST_HEAP_BLOCK:


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