[Vm-dev] [commit][3284] CogVM source as per VMMaker.oscog-eem.1113

commits at squeakvm.org commits at squeakvm.org
Mon Mar 23 20:04:08 UTC 2015


Revision: 3284
Author:   eliot
Date:     2015-03-23 13:04:06 -0700 (Mon, 23 Mar 2015)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1113

Redo free space allocation on Spur image load.  Provide a minimum ammount of
free space, taking into account extant free space.  Provisionally use
extraVMMemory in the header, defaulting to growHeadroom if extraVMMemory is
empty.  This can be revised if folks protest.

Provide a common sizeof: for SQSocket.  Exclude dumpImage: from Spur (no seg support yet)

Modified Paths:
--------------
    branches/Cog/nsspursrc/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
    branches/Cog/nsspursrc/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c
    branches/Cog/nsspursrc/vm/cointerp.c
    branches/Cog/nsspursrc/vm/cointerp.h
    branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
    branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
    branches/Cog/nsspurstacksrc/vm/interp.c
    branches/Cog/platforms/Mac OS/vm/sqMacMain.c
    branches/Cog/platforms/unix/vm/sqUnixMain.c
    branches/Cog/sistasrc/vm/cointerp.c
    branches/Cog/sistasrc/vm/cointerp.h
    branches/Cog/sistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursistasrc/vm/cointerp.c
    branches/Cog/spursistasrc/vm/cointerp.h
    branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursrc/vm/cointerp.c
    branches/Cog/spursrc/vm/cointerp.h
    branches/Cog/spursrc/vm/gcc3x-cointerp.c
    branches/Cog/spurstack64src/vm/gcc3x-interp.c
    branches/Cog/spurstack64src/vm/interp.c
    branches/Cog/spurstacksrc/vm/gcc3x-interp.c
    branches/Cog/spurstacksrc/vm/interp.c
    branches/Cog/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
    branches/Cog/src/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c
    branches/Cog/src/vm/cointerp.c
    branches/Cog/src/vm/cointerp.h
    branches/Cog/src/vm/cointerpmt.c
    branches/Cog/src/vm/cointerpmt.h
    branches/Cog/src/vm/gcc3x-cointerp.c
    branches/Cog/src/vm/gcc3x-cointerpmt.c
    branches/Cog/stacksrc/vm/gcc3x-interp.c
    branches/Cog/stacksrc/vm/interp.c

Property Changed:
----------------
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h

Modified: branches/Cog/nsspursrc/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
===================================================================
--- branches/Cog/nsspursrc/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c	2015-03-23 05:44:52 UTC (rev 3283)
+++ branches/Cog/nsspursrc/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c	2015-03-23 20:04:06 UTC (rev 3284)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.1088 uuid: 8298a649-68d4-4bac-ace3-46649a076245
+	VMPluginCodeGenerator VMMaker.oscog-eem.1113 uuid: 9b08eea7-d3db-440f-ba64-16abc799fcf8
    from
-	UnixOSProcessPlugin * VMConstruction-Plugins-OSProcessPlugin.oscog-eem.49 uuid: dbbde2e2-9103-4ba8-96a9-33c29e7ee7e4
+	UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.50 uuid: 67b1e805-4efd-476c-8cf3-b4a5e14e22a9
  */
-static char __buildInfo[] = "UnixOSProcessPlugin * VMConstruction-Plugins-OSProcessPlugin.oscog-eem.49 uuid: dbbde2e2-9103-4ba8-96a9-33c29e7ee7e4 " __DATE__ ;
+static char __buildInfo[] = "UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.50 uuid: 67b1e805-4efd-476c-8cf3-b4a5e14e22a9 " __DATE__ ;
 /* D T Lewis - UnixOSProcessPlugin.c translated from class
    UnixOSProcessPlugin of OSProcessPlugin version 4.3.3 Cog */
 
@@ -316,9 +316,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"UnixOSProcessPlugin * VMConstruction-Plugins-OSProcessPlugin.oscog-eem.49 (i)"
+	"UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.50 (i)"
 #else
-	"UnixOSProcessPlugin * VMConstruction-Plugins-OSProcessPlugin.oscog-eem.49 (e)"
+	"UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.50 (e)"
 #endif
 ;
 static void *originalSigHandlers[NSIG];
@@ -1070,7 +1070,7 @@
 
 	sqSocketBytes = arrayValueOf(objectPointer);
 	idx = 0;
-	while (idx < (socketRecordSize())) {
+	while (idx < (sizeof(SQSocket))) {
 		if ((sqSocketBytes[idx]) != 0) {
 			return 0;
 		}
@@ -1105,7 +1105,7 @@
 isSQSocketObject(sqInt objectPointer)
 {
 	return ((isBytes(objectPointer))
-	 && ((byteSizeOf(objectPointer)) == (socketRecordSize())))
+	 && ((byteSizeOf(objectPointer)) == (sizeof(SQSocket))))
 	 && (!(isNullSQSocket(objectPointer)));
 }
 
@@ -1302,7 +1302,7 @@
 static sqInt
 newSQSocketByteArray(void)
 {
-	return instantiateClassindexableSize(classByteArray(), socketRecordSize());
+	return instantiateClassindexableSize(classByteArray(), sizeof(SQSocket));
 }
 
 
@@ -3336,7 +3336,7 @@
 primitiveSizeOfInt(void)
 {
 	pop(1);
-	pushInteger(sizeOfInt());
+	pushInteger(sizeof(int));
 }
 
 

Modified: branches/Cog/nsspursrc/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c
===================================================================
--- branches/Cog/nsspursrc/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c	2015-03-23 05:44:52 UTC (rev 3283)
+++ branches/Cog/nsspursrc/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c	2015-03-23 20:04:06 UTC (rev 3284)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.1088 uuid: 8298a649-68d4-4bac-ace3-46649a076245
+	VMPluginCodeGenerator VMMaker.oscog-eem.1113 uuid: 9b08eea7-d3db-440f-ba64-16abc799fcf8
    from
-	Win32OSProcessPlugin * VMConstruction-Plugins-OSProcessPlugin.oscog-eem.49 uuid: dbbde2e2-9103-4ba8-96a9-33c29e7ee7e4
+	Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.50 uuid: 67b1e805-4efd-476c-8cf3-b4a5e14e22a9
  */
-static char __buildInfo[] = "Win32OSProcessPlugin * VMConstruction-Plugins-OSProcessPlugin.oscog-eem.49 uuid: dbbde2e2-9103-4ba8-96a9-33c29e7ee7e4 " __DATE__ ;
+static char __buildInfo[] = "Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.50 uuid: 67b1e805-4efd-476c-8cf3-b4a5e14e22a9 " __DATE__ ;
 /* D T Lewis - Win32OSProcessPlugin.c translated from class
    Win32OSProcessPlugin of OSProcessPlugin version 4.3.3 Cog */
 
@@ -222,9 +222,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"Win32OSProcessPlugin * VMConstruction-Plugins-OSProcessPlugin.oscog-eem.49 (i)"
+	"Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.50 (i)"
 #else
-	"Win32OSProcessPlugin * VMConstruction-Plugins-OSProcessPlugin.oscog-eem.49 (e)"
+	"Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.50 (e)"
 #endif
 ;
 static int osprocessSandboxSecurity;
@@ -560,7 +560,7 @@
 
 	sqSocketBytes = arrayValueOf(objectPointer);
 	idx = 0;
-	while (idx < (socketRecordSize())) {
+	while (idx < (sizeof(SQSocket))) {
 		if ((sqSocketBytes[idx]) != 0) {
 			return 0;
 		}
@@ -595,7 +595,7 @@
 isSQSocketObject(sqInt objectPointer)
 {
 	return ((isBytes(objectPointer))
-	 && ((byteSizeOf(objectPointer)) == (socketRecordSize())))
+	 && ((byteSizeOf(objectPointer)) == (sizeof(SQSocket))))
 	 && (!(isNullSQSocket(objectPointer)));
 }
 
@@ -644,7 +644,7 @@
 static sqInt
 newSQSocketByteArray(void)
 {
-	return instantiateClassindexableSize(classByteArray(), socketRecordSize());
+	return instantiateClassindexableSize(classByteArray(), sizeof(SQSocket));
 }
 
 
@@ -1750,7 +1750,7 @@
 primitiveSizeOfInt(void)
 {
 	pop(1);
-	pushInteger(sizeOfInt());
+	pushInteger(sizeof(int));
 }
 
 

Modified: branches/Cog/nsspursrc/vm/cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.c	2015-03-23 05:44:52 UTC (rev 3283)
+++ branches/Cog/nsspursrc/vm/cointerp.c	2015-03-23 20:04:06 UTC (rev 3284)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1111 uuid: d49aabf6-9652-4eaf-b08d-0ccddc9c9146
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1113 uuid: 9b08eea7-d3db-440f-ba64-16abc799fcf8
    from
-	CoInterpreter VMMaker.oscog-eem.1111 uuid: d49aabf6-9652-4eaf-b08d-0ccddc9c9146
+	CoInterpreter VMMaker.oscog-eem.1113 uuid: 9b08eea7-d3db-440f-ba64-16abc799fcf8
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1111 uuid: d49aabf6-9652-4eaf-b08d-0ccddc9c9146 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1113 uuid: 9b08eea7-d3db-440f-ba64-16abc799fcf8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1170,7 +1170,7 @@
 static sqInt storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots) NoDbgRegParms;
 sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer);
 sqInt storePointerofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer);
-sqInt stringForCString(const char *aCString);
+usqInt stringForCString(const char *aCString);
 static sqInt sufficientSpaceAfterGC(sqInt numBytes) NoDbgRegParms;
 static sqInt swizzleObjStackAt(sqInt objStackRootIndex) NoDbgRegParms;
 void tenuringIncrementalGC(void);
@@ -1258,7 +1258,6 @@
 static sqInt doPrimitiveModby(sqInt rcvr, sqInt arg) NoDbgRegParms;
 sqInt doSignalSemaphoreWithIndex(sqInt index);
 static void dummyReferToProxy(void);
-EXPORT(sqInt) dumpImage(sqInt fileName);
 static sqInt enclosingObjectAtwithObjectwithMixin(sqInt depth, sqInt methodReceiver, sqInt methodMixin) NoDbgRegParms;
 static sqInt ensureCallerContext(char *theFP) NoDbgRegParms;
 static void ensureImageFormatIsUpToDate(sqInt swapBytes) NoDbgRegParms;
@@ -1581,8 +1580,8 @@
 _iss sqInt profileMethod;
 _iss SpurContiguousObjStack unscannedEphemerons;
 _iss usqInt firstFreeChunk;
+_iss sqInt numStackPages;
 _iss StackPage * mostRecentlyUsedPage;
-_iss sqInt numStackPages;
 _iss SpurNewSpaceSpace pastSpace;
 _iss sqInt longRunningPrimitiveCheckMethod;
 _iss usqInt oldSpaceStart;
@@ -1601,11 +1600,11 @@
 _iss usqInt freeOldSpaceStart;
 _iss sqInt tenureThreshold;
 _iss sqInt extraRootCount;
+_iss sqInt growHeadroom;
 _iss sqInt invalidObjStackPage;
 _iss sqInt previousRememberedSetSize;
 _iss sqInt becomeEffectsFlags;
 _iss sqInt classNameIndex;
-_iss sqInt growHeadroom;
 _iss sqInt ephemeronQueue;
 _iss sqInt lastMethodCacheProbeWrite;
 _iss sqInt metaclassNumSlots;
@@ -1614,6 +1613,7 @@
 _iss sqInt lkupClass;
 _iss usqLong nextWakeupUsecs;
 _iss sqInt numSegInfos;
+_iss sqInt cogCodeSize;
 _iss sqInt flagInterpretedMethods;
 _iss sqInt highestRunnableProcessPriority;
 _iss sqInt lastCoggableInterpretedBlockMethod;
@@ -1623,7 +1623,6 @@
 _iss usqLong statCheckForEvents;
 _iss usqLong statGCEndUsecs;
 _iss sqInt weakList;
-_iss sqInt cogCodeSize;
 _iss sqInt externalPrimitiveTableFirstFreeIndex;
 _iss sqInt gcMode;
 _iss sqInt thisClassIndex;
@@ -1743,8 +1742,8 @@
 sqInt inIOProcessEvents;
 sqInt desiredEdenBytes;
 sqInt desiredNumStackPages;
+sqInt extraVMMemory;
 sqInt checkForLeaks;
-sqInt extraVMMemory;
 sqInt desiredCogCodeSize;
 char * breakSelector;
 usqInt heapBase;
@@ -2364,7 +2363,7 @@
 /*560*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
 	};
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1111";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1113";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -22516,31 +22515,45 @@
 }
 
 
-/*	Read an image from the given file stream, allocating the given amount of
-	memory to its object heap. Fail if the image has an unknown format or
-	requires more than the given amount of memory.
- */
-/*	Details: This method detects when the image was stored on a machine with
-	the opposite byte ordering from this machine and swaps the bytes
-	automatically. Furthermore, it allows the header information to start 512
-	bytes into the file, since some file transfer programs for the Macintosh
+/*	Read an image from the given file stream, allocating an amount of memory
+	to its object heap.
+	
+	V3: desiredHeapSize is the total size of the heap. Fail if the image has
+	an unknown format or
+	requires more than the specified amount of memory.
+	
+	Spur: desiredHeapSize is ignored; this routine will attempt to provide at
+	least extraVMMemory's
+	ammount of free space after the image is loaded, taking any free space in
+	teh image into account.
+	extraVMMemory is stored in the image header and is accessible as
+	vmParameterAt: 23. If
+	extraVMMemory is 0, the value defaults to the default grow headroom. Fail
+	if the image has an
+	unknown format or if sufficient memory cannot be allocated.
+	
+	Details: This method detects when the image was stored on a machine with
+	the opposite byte
+	ordering from this machine and swaps the bytes automatically. Furthermore,
+	it allows the header
+	information to start 512 bytes into the file, since some file transfer
+	programs for the Macintosh
 	apparently prepend a Mac-specific header of this size. Note that this same
-	512 bytes of prefix area could also be used to store an exec command on
-	Unix systems, allowing one to launch Smalltalk by invoking the image name
-	as a command.
- */
-/*	This code is based on C code by Ian Piumarta and Smalltalk code by Tim
-	Rowledge. Many thanks to both of you!!
- */
+	512 bytes of prefix
+	area could also be used to store an exec command on Unix systems, allowing
+	one to launch
+	Smalltalk by invoking the image name as a command. */
 
 size_t
 readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squeakFileOffsetType imageOffset)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt actualEdenBytes;
+    usqInt allocationReserve;
     SpurNewSpaceSpace *aNewSpace;
     sqInt anObject;
     sqInt aValue;
     sqInt baseOfHeap;
+    sqInt bit;
     sqInt bytes;
     sqInt bytesRead;
     usqInt bytesToShift;
@@ -22549,6 +22562,7 @@
     size_t dataSize;
     sqInt edenBytes;
     sqInt firstSegSize;
+    sqInt freeOldSpaceInImage;
     sqInt hdrCogCodeSize;
     sqInt hdrEdenBytes;
     sqInt hdrMaxExtSemTabSize;
@@ -22556,7 +22570,10 @@
     sqInt headerFlags;
     sqInt headerSize;
     squeakFileOffsetType headerStart;
+    sqInt headroom;
+    sqInt headroom1;
     usqInt heapSize;
+    usqInt heapSize1;
     sqInt i;
     sqInt i1;
     sqInt i11;
@@ -22565,6 +22582,8 @@
     sqInt i4;
     sqInt iLimiT;
     usqInt limit;
+    sqInt maxFramesPerPage;
+    sqInt maxUsedBytesPerPage;
     sqInt memEnd;
     sqInt memLimit;
     usqInt minimumMemory;
@@ -22578,19 +22597,20 @@
     sqInt survivorBytes;
     sqInt swapBytes;
     sqInt totalBytes;
-    int w;
-    sqInt w1;
-    short w10;
+    sqInt w;
+    int w1;
+    int w10;
     short w11;
-    sqInt w12;
+    short w12;
+    sqInt w13;
     sqInt w2;
     sqInt w3;
     sqInt w4;
     sqInt w5;
     sqInt w6;
-    int w7;
-    short w8;
-    int w9;
+    sqInt w7;
+    int w8;
+    short w9;
 
 
 	/* guess Metaclass instSize */
@@ -22606,51 +22626,51 @@
 
 	headerStart = (sqImageFilePosition(f)) - 4;
 	/* begin getWord32FromFile:swap: */
-	w = 0;
-	sqImageFileRead((&w), sizeof(int), 1, f);
+	w1 = 0;
+	sqImageFileRead((&w1), sizeof(int), 1, f);
 	headerSize = (swapBytes
-		? ((((((usqInt) w >> 24)) & Byte0Mask) + ((((usqInt) w >> 8)) & Byte1Mask)) + ((((usqInt) w << 8)) & Byte2Mask)) + ((((usqInt) w << 24)) & Byte3Mask)
-		: w);
+		? ((((((usqInt) w1 >> 24)) & Byte0Mask) + ((((usqInt) w1 >> 8)) & Byte1Mask)) + ((((usqInt) w1 << 8)) & Byte2Mask)) + ((((usqInt) w1 << 24)) & Byte3Mask)
+		: w1);
 	/* begin getLongFromFile:swap: */
-	w1 = 0;
-	sqImageFileRead((&w1), sizeof(w1), 1, f);
-	dataSize = ((sqInt) ((swapBytes
-	? ((((((usqInt) w1 >> 24)) & Byte0Mask) + ((((usqInt) w1 >> 8)) & Byte1Mask)) + ((((usqInt) w1 << 8)) & Byte2Mask)) + ((((usqInt) w1 << 24)) & Byte3Mask)
-	: w1)));
-	/* begin getLongFromFile:swap: */
 	w2 = 0;
 	sqImageFileRead((&w2), sizeof(w2), 1, f);
-	oldBaseAddr = (swapBytes
-		? ((((((usqInt) w2 >> 24)) & Byte0Mask) + ((((usqInt) w2 >> 8)) & Byte1Mask)) + ((((usqInt) w2 << 8)) & Byte2Mask)) + ((((usqInt) w2 << 24)) & Byte3Mask)
-		: w2);
-	/* begin specialObjectsOop: */
+	dataSize = ((sqInt) ((swapBytes
+	? ((((((usqInt) w2 >> 24)) & Byte0Mask) + ((((usqInt) w2 >> 8)) & Byte1Mask)) + ((((usqInt) w2 << 8)) & Byte2Mask)) + ((((usqInt) w2 << 24)) & Byte3Mask)
+	: w2)));
 	/* begin getLongFromFile:swap: */
 	w3 = 0;
 	sqImageFileRead((&w3), sizeof(w3), 1, f);
-	anObject = (swapBytes
+	oldBaseAddr = (swapBytes
 		? ((((((usqInt) w3 >> 24)) & Byte0Mask) + ((((usqInt) w3 >> 8)) & Byte1Mask)) + ((((usqInt) w3 << 8)) & Byte2Mask)) + ((((usqInt) w3 << 24)) & Byte3Mask)
 		: w3);
-	GIV(specialObjectsOop) = anObject;
-	/* begin lastHash: */
+	/* begin specialObjectsOop: */
 	/* begin getLongFromFile:swap: */
 	w4 = 0;
 	sqImageFileRead((&w4), sizeof(w4), 1, f);
-	seed = (swapBytes
+	anObject = (swapBytes
 		? ((((((usqInt) w4 >> 24)) & Byte0Mask) + ((((usqInt) w4 >> 8)) & Byte1Mask)) + ((((usqInt) w4 << 8)) & Byte2Mask)) + ((((usqInt) w4 << 24)) & Byte3Mask)
 		: w4);
-	GIV(lastHash) = seed;
+	GIV(specialObjectsOop) = anObject;
+	/* begin lastHash: */
 	/* begin getLongFromFile:swap: */
 	w5 = 0;
 	sqImageFileRead((&w5), sizeof(w5), 1, f);
-	GIV(savedWindowSize) = (swapBytes
+	seed = (swapBytes
 		? ((((((usqInt) w5 >> 24)) & Byte0Mask) + ((((usqInt) w5 >> 8)) & Byte1Mask)) + ((((usqInt) w5 << 8)) & Byte2Mask)) + ((((usqInt) w5 << 24)) & Byte3Mask)
 		: w5);
+	GIV(lastHash) = seed;
 	/* begin getLongFromFile:swap: */
 	w6 = 0;
 	sqImageFileRead((&w6), sizeof(w6), 1, f);
-	headerFlags = (swapBytes
+	GIV(savedWindowSize) = (swapBytes
 		? ((((((usqInt) w6 >> 24)) & Byte0Mask) + ((((usqInt) w6 >> 8)) & Byte1Mask)) + ((((usqInt) w6 << 8)) & Byte2Mask)) + ((((usqInt) w6 << 24)) & Byte3Mask)
 		: w6);
+	/* begin getLongFromFile:swap: */
+	w7 = 0;
+	sqImageFileRead((&w7), sizeof(w7), 1, f);
+	headerFlags = (swapBytes
+		? ((((((usqInt) w7 >> 24)) & Byte0Mask) + ((((usqInt) w7 >> 8)) & Byte1Mask)) + ((((usqInt) w7 << 8)) & Byte2Mask)) + ((((usqInt) w7 << 24)) & Byte3Mask)
+		: w7);
 	/* begin setImageHeaderFlagsFrom: */
 
 	/* so as to preserve unrecognised flags. */
@@ -22666,17 +22686,17 @@
 	GIV(noThreadingOfGUIThread) = (headerFlags & 32) != 0;
 	
 	/* begin getWord32FromFile:swap: */
-	w7 = 0;
-	sqImageFileRead((&w7), sizeof(int), 1, f);
+	w8 = 0;
+	sqImageFileRead((&w8), sizeof(int), 1, f);
 	extraVMMemory = (swapBytes
-		? ((((((usqInt) w7 >> 24)) & Byte0Mask) + ((((usqInt) w7 >> 8)) & Byte1Mask)) + ((((usqInt) w7 << 8)) & Byte2Mask)) + ((((usqInt) w7 << 24)) & Byte3Mask)
-		: w7);
+		? ((((((usqInt) w8 >> 24)) & Byte0Mask) + ((((usqInt) w8 >> 8)) & Byte1Mask)) + ((((usqInt) w8 << 8)) & Byte2Mask)) + ((((usqInt) w8 << 24)) & Byte3Mask)
+		: w8);
 	/* begin getShortFromFile:swap: */
-	w8 = 0;
-	sqImageFileRead((&w8), sizeof(short), 1, f);
+	w9 = 0;
+	sqImageFileRead((&w9), sizeof(short), 1, f);
 	hdrNumStackPages = (swapBytes
-		? ((((((usqInt) w8 >> 24)) & Byte0Mask) + ((((usqInt) w8 >> 8)) & Byte1Mask)) + ((((usqInt) w8 << 8)) & Byte2Mask)) + ((((usqInt) w8 << 24)) & Byte3Mask)
-		: w8);
+		? ((((((usqInt) w9 >> 24)) & Byte0Mask) + ((((usqInt) w9 >> 8)) & Byte1Mask)) + ((((usqInt) w9 << 8)) & Byte2Mask)) + ((((usqInt) w9 << 24)) & Byte3Mask)
+		: w9);
 	GIV(numStackPages) = (desiredNumStackPages != 0
 		? desiredNumStackPages
 		: (hdrNumStackPages == 0
@@ -22693,11 +22713,11 @@
 				? defaultCogCodeSize()
 				: hdrCogCodeSize));
 	/* begin getWord32FromFile:swap: */
-	w9 = 0;
-	sqImageFileRead((&w9), sizeof(int), 1, f);
+	w10 = 0;
+	sqImageFileRead((&w10), sizeof(int), 1, f);
 	hdrEdenBytes = (swapBytes
-		? ((((((usqInt) w9 >> 24)) & Byte0Mask) + ((((usqInt) w9 >> 8)) & Byte1Mask)) + ((((usqInt) w9 << 8)) & Byte2Mask)) + ((((usqInt) w9 << 24)) & Byte3Mask)
-		: w9);
+		? ((((((usqInt) w10 >> 24)) & Byte0Mask) + ((((usqInt) w10 >> 8)) & Byte1Mask)) + ((((usqInt) w10 << 8)) & Byte2Mask)) + ((((usqInt) w10 << 24)) & Byte3Mask)
+		: w10);
 	/* begin edenBytes: */
 	bytes = (desiredEdenBytes != 0
 		? desiredEdenBytes
@@ -22707,41 +22727,81 @@
 	edenBytes = bytes;
 	desiredEdenBytes = hdrEdenBytes;
 	/* begin getShortFromFile:swap: */
-	w10 = 0;
-	sqImageFileRead((&w10), sizeof(short), 1, f);
+	w11 = 0;
+	sqImageFileRead((&w11), sizeof(short), 1, f);
 	hdrMaxExtSemTabSize = (swapBytes
-		? ((((((usqInt) w10 >> 24)) & Byte0Mask) + ((((usqInt) w10 >> 8)) & Byte1Mask)) + ((((usqInt) w10 << 8)) & Byte2Mask)) + ((((usqInt) w10 << 24)) & Byte3Mask)
-		: w10);
+		? ((((((usqInt) w11 >> 24)) & Byte0Mask) + ((((usqInt) w11 >> 8)) & Byte1Mask)) + ((((usqInt) w11 << 8)) & Byte2Mask)) + ((((usqInt) w11 << 24)) & Byte3Mask)
+		: w11);
 	if (hdrMaxExtSemTabSize != 0) {
 		/* begin setMaxExtSemSizeTo: */
 		GIV(maxExtSemTabSizeSet) = 1;
 		ioSetMaxExtSemTableSize(hdrMaxExtSemTabSize);
 	}
 	/* begin getShortFromFile:swap: */
-	w11 = 0;
-	sqImageFileRead((&w11), sizeof(short), 1, f);
+	w12 = 0;
+	sqImageFileRead((&w12), sizeof(short), 1, f);
 	GIV(the2ndUnknownShort) = (swapBytes
-		? ((((((usqInt) w11 >> 24)) & Byte0Mask) + ((((usqInt) w11 >> 8)) & Byte1Mask)) + ((((usqInt) w11 << 8)) & Byte2Mask)) + ((((usqInt) w11 << 24)) & Byte3Mask)
-		: w11);
+		? ((((((usqInt) w12 >> 24)) & Byte0Mask) + ((((usqInt) w12 >> 8)) & Byte1Mask)) + ((((usqInt) w12 << 8)) & Byte2Mask)) + ((((usqInt) w12 << 24)) & Byte3Mask)
+		: w12);
 	/* begin getLongFromFile:swap: */
-	w12 = 0;
-	sqImageFileRead((&w12), sizeof(w12), 1, f);
+	w13 = 0;
+	sqImageFileRead((&w13), sizeof(w13), 1, f);
 	firstSegSize = (swapBytes
-		? ((((((usqInt) w12 >> 24)) & Byte0Mask) + ((((usqInt) w12 >> 8)) & Byte1Mask)) + ((((usqInt) w12 << 8)) & Byte2Mask)) + ((((usqInt) w12 << 24)) & Byte3Mask)
-		: w12);
+		? ((((((usqInt) w13 >> 24)) & Byte0Mask) + ((((usqInt) w13 >> 8)) & Byte1Mask)) + ((((usqInt) w13 << 8)) & Byte2Mask)) + ((((usqInt) w13 << 24)) & Byte3Mask)
+		: w13);
 	/* begin firstSegmentSize: */
 	GIV(firstSegmentSize) = firstSegSize;
+	/* begin interpreterAllocationReserveBytes */
+	maxUsedBytesPerPage = (512) + ((IFrameSlots + 64) * BytesPerWord);
+	maxFramesPerPage = (maxUsedBytesPerPage / BytesPerWord) / MFrameSlots;
+	allocationReserve = ((maxFramesPerPage * LargeContextSlots) * BytesPerOop) * GIV(numStackPages);
 
 	/* no need to include the stackZone; this is alloca'ed */
 
-	minimumMemory = ((GIV(cogCodeSize) + dataSize) + edenBytes) + (interpreterAllocationReserveBytes());
+	minimumMemory = ((GIV(cogCodeSize) + dataSize) + edenBytes) + allocationReserve;
+	/* begin getLongFromFile:swap: */
+	w = 0;
+	sqImageFileRead((&w), sizeof(w), 1, f);
+	freeOldSpaceInImage = (swapBytes
+		? ((((((usqInt) w >> 24)) & Byte0Mask) + ((((usqInt) w >> 8)) & Byte1Mask)) + ((((usqInt) w << 8)) & Byte2Mask)) + ((((usqInt) w << 24)) & Byte3Mask)
+		: w);
+	/* begin initialHeadroom:givenFreeOldSpaceInImage: */
+	headroom1 = (extraVMMemory == 0
+		? (!(GIV(growHeadroom))
+				? (16 * 1024) * 1024
+				: GIV(growHeadroom))
+		: extraVMMemory);
+	if (freeOldSpaceInImage >= headroom1) {
+		headroom = 0;
+		goto l1;
+	}
+	if (freeOldSpaceInImage >= ((headroom1 * 7) / 8)) {
+		headroom = headroom1 / 8;
+		goto l1;
+	}
+	if (freeOldSpaceInImage >= ((headroom1 * 3) / 4)) {
+		headroom = headroom1 / 4;
+		goto l1;
+	}
+	if (freeOldSpaceInImage >= ((headroom1 * 5) / 8)) {
+		headroom = (headroom1 * 3) / 8;
+		goto l1;
+	}
+	if (freeOldSpaceInImage >= (headroom1 / 2)) {
+		headroom = headroom1 / 2;
+		goto l1;
+	}
+	headroom = headroom1;
+l1:	/* end initialHeadroom:givenFreeOldSpaceInImage: */;
+	/* begin roundUpHeapSize: */
+	heapSize1 = (((GIV(cogCodeSize) + dataSize) + headroom) + edenBytes) + ((headroom > allocationReserve
+	? 0
+	: allocationReserve));
+	bit = (((highBit(heapSize1)) - 1) * 3) / 4;
+	heapSize = (heapSize1 & ((1 << bit) - 1)
+		? (((heapSize1 | ((1 << bit) - 1)) - ((1 << bit) - 1))) + (1 << bit)
+		: heapSize1);
 
-	/* no need to include the stackZone; this is alloca'ed */
-
-	heapSize = ((GIV(cogCodeSize) + desiredHeapSize) + edenBytes) + (interpreterAllocationReserveBytes());
-	if (heapSize < minimumMemory) {
-		insufficientMemorySpecifiedError();
-	}
 	/* begin memory: */
 	aValue = ((usqInt)(allocateMemoryminimumimageFileheaderSize(heapSize, minimumMemory, f, headerSize)));
 	GIV(memory) = aValue;
@@ -29635,7 +29695,7 @@
 				GIV(needGCFlag) = 1;
 				forceInterruptCheck();
 			}
-			s = allocateSlotsInOldSpacebytesformatclassIndex(numSlots, numBytes, formatField, ClassByteStringCompactIndex);
+			s = ((usqInt) (allocateSlotsInOldSpacebytesformatclassIndex(numSlots, numBytes, formatField, ClassByteStringCompactIndex)));
 			goto l1;
 		}
 		if (numSlots >= 0xFF) {
@@ -35015,7 +35075,7 @@
     sqInt err;
     sqInt hash;
     sqInt instSpec;
-    sqInt newObj;
+    usqInt newObj;
     usqInt newObj1;
     usqInt numBytes;
     sqInt numSlots;
@@ -35130,7 +35190,7 @@
     sqInt i;
     sqInt instSpec;
     sqInt literalCount;
-    sqInt newObj;
+    usqInt newObj;
     usqInt newObj1;
     usqInt numBytes;
     sqInt numSlots;
@@ -40922,7 +40982,7 @@
     sqInt fillValue;
     sqInt hash;
     sqInt instSpec;
-    sqInt newObj;
+    usqInt newObj;
     usqInt newObj1;
     usqInt numBytes;
     usqInt numSlots;
@@ -42791,7 +42851,7 @@
     sqInt entry;
     sqInt expectedIndex;
     sqInt expectedIndex1;
-    sqInt freeChunk;
+    usqInt freeChunk;
     sqInt i;
     sqInt i1;
     sqInt index;
@@ -42830,7 +42890,7 @@
     sqInt ptr1;
     sqInt ptr2;
     sqInt slotBytes;
-    sqInt smallObj;
+    usqInt smallObj;
     sqInt start;
 
 	classIndex = (long32At(aClass + 4)) & 0x3FFFFF;
@@ -45765,7 +45825,7 @@
     sqInt fmt;
     sqInt hasYoung;
     sqInt i;
-    sqInt newObj;
+    usqInt newObj;
     usqInt newObj1;
     usqInt numBytes;
     usqInt numSlots;
@@ -59977,8 +60037,8 @@
     sqInt prevPrevObj;
     sqInt prevPrevObj1;
     sqInt ptr;
-    sqInt savedInHashes;
-    sqInt savedOutHashes;
+    usqInt savedInHashes;
+    usqInt savedOutHashes;
     sqInt segAddr;
     sqInt segStart;
     sqInt slotBytes;
@@ -60445,13 +60505,13 @@
 /*	Answer a new String copied from a null-terminated C string,
 	or nil if out of memory. */
 
-sqInt
+usqInt
 stringForCString(const char *aCString)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt formatField;
     sqInt len;
     usqInt newObj;
-    sqInt newString;
+    usqInt newString;
     usqInt numBytes;
     sqInt numSlots;
 
@@ -61367,7 +61427,7 @@
     sqInt largeChild;
     sqInt newEndOfMemory;
     sqInt next;
-    usqInt node;
+    sqInt node;
     SpurSegmentInfo *seg;
     sqInt smallChild;
     sqInt treeNode;
@@ -63419,26 +63479,6 @@
 }
 
 
-/*	Dump the entire image out to the given file. Intended for debugging only. */
-
-EXPORT(sqInt)
-dumpImage(sqInt fileName)
-{
-    usqInt dataSize;
-    sqImageFile f;
-    sqInt result;
-
-	f = sqImageFileOpen(pointerForOop(fileName), "wb");
-	if (f == null) {
-		return -1;
-	}
-	dataSize = (endOfMemory()) - (startOfMemory());
-	result = sqImageFileWrite(pointerForOop(memory()), sizeof(unsigned char), dataSize, f);
-	sqImageFileClose(f);
-	return result;
-}
-
-
 /*	This is used to implement outer sends and outer expressions in Newspeak. */
 
 static sqInt
@@ -78318,7 +78358,6 @@
 void* vm_exports[][3] = {
 	{"", "callbackEnter", (void*)callbackEnter},
 	{"", "callbackLeave", (void*)callbackLeave},
-	{"", "dumpImage", (void*)dumpImage},
 	{"", "moduleUnloaded", (void*)moduleUnloaded},
 	{"", "primitiveAddLargeIntegers\000\377", (void*)primitiveAddLargeIntegers},
 	{"", "primitiveAllInstances\000\377", (void*)primitiveAllInstances},

Modified: branches/Cog/nsspursrc/vm/cointerp.h
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.h	2015-03-23 05:44:52 UTC (rev 3283)
+++ branches/Cog/nsspursrc/vm/cointerp.h	2015-03-23 20:04:06 UTC (rev 3284)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1111 uuid: d49aabf6-9652-4eaf-b08d-0ccddc9c9146
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1113 uuid: 9b08eea7-d3db-440f-ba64-16abc799fcf8
  */
 
 
@@ -252,7 +252,7 @@
 sqInt splObj(sqInt index);
 usqInt storeCheckBoundary(void);
 sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer);
-sqInt stringForCString(const char *aCString);
+usqInt stringForCString(const char *aCString);
 void tenuringIncrementalGC(void);
 sqInt topRemappableOop(void);
 sqInt validFreeTree(void);

Modified: branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/gcc3x-cointerp.c	2015-03-23 05:44:52 UTC (rev 3283)
+++ branches/Cog/nsspursrc/vm/gcc3x-cointerp.c	2015-03-23 20:04:06 UTC (rev 3284)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1111 uuid: d49aabf6-9652-4eaf-b08d-0ccddc9c9146
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1113 uuid: 9b08eea7-d3db-440f-ba64-16abc799fcf8
    from
-	CoInterpreter VMMaker.oscog-eem.1111 uuid: d49aabf6-9652-4eaf-b08d-0ccddc9c9146
+	CoInterpreter VMMaker.oscog-eem.1113 uuid: 9b08eea7-d3db-440f-ba64-16abc799fcf8
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1111 uuid: d49aabf6-9652-4eaf-b08d-0ccddc9c9146 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1113 uuid: 9b08eea7-d3db-440f-ba64-16abc799fcf8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1173,7 +1173,7 @@
 static sqInt storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots) NoDbgRegParms;
 sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer);
 sqInt storePointerofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer);
-sqInt stringForCString(const char *aCString);
+usqInt stringForCString(const char *aCString);
 static sqInt sufficientSpaceAfterGC(sqInt numBytes) NoDbgRegParms;
 static sqInt swizzleObjStackAt(sqInt objStackRootIndex) NoDbgRegParms;
 void tenuringIncrementalGC(void);
@@ -1261,7 +1261,6 @@
 static sqInt doPrimitiveModby(sqInt rcvr, sqInt arg) NoDbgRegParms;
 sqInt doSignalSemaphoreWithIndex(sqInt index);
 static void dummyReferToProxy(void);
-EXPORT(sqInt) dumpImage(sqInt fileName);
 static sqInt enclosingObjectAtwithObjectwithMixin(sqInt depth, sqInt methodReceiver, sqInt methodMixin) NoDbgRegParms;
 static sqInt ensureCallerContext(char *theFP) NoDbgRegParms;
 static void ensureImageFormatIsUpToDate(sqInt swapBytes) NoDbgRegParms;
@@ -1584,8 +1583,8 @@
 _iss sqInt profileMethod;
 _iss SpurContiguousObjStack unscannedEphemerons;
 _iss usqInt firstFreeChunk;
+_iss sqInt numStackPages;
 _iss StackPage * mostRecentlyUsedPage;
-_iss sqInt numStackPages;
 _iss SpurNewSpaceSpace pastSpace;
 _iss sqInt longRunningPrimitiveCheckMethod;
 _iss usqInt oldSpaceStart;
@@ -1604,11 +1603,11 @@
 _iss usqInt freeOldSpaceStart;
 _iss sqInt tenureThreshold;
 _iss sqInt extraRootCount;
+_iss sqInt growHeadroom;
 _iss sqInt invalidObjStackPage;
 _iss sqInt previousRememberedSetSize;
 _iss sqInt becomeEffectsFlags;
 _iss sqInt classNameIndex;
-_iss sqInt growHeadroom;
 _iss sqInt ephemeronQueue;
 _iss sqInt lastMethodCacheProbeWrite;
 _iss sqInt metaclassNumSlots;
@@ -1617,6 +1616,7 @@
 _iss sqInt lkupClass;
 _iss usqLong nextWakeupUsecs;
 _iss sqInt numSegInfos;
+_iss sqInt cogCodeSize;
 _iss sqInt flagInterpretedMethods;
 _iss sqInt highestRunnableProcessPriority;
 _iss sqInt lastCoggableInterpretedBlockMethod;
@@ -1626,7 +1626,6 @@
 _iss usqLong statCheckForEvents;
 _iss usqLong statGCEndUsecs;
 _iss sqInt weakList;
-_iss sqInt cogCodeSize;
 _iss sqInt externalPrimitiveTableFirstFreeIndex;
 _iss sqInt gcMode;
 _iss sqInt thisClassIndex;
@@ -1746,8 +1745,8 @@
 sqInt inIOProcessEvents;
 sqInt desiredEdenBytes;
 sqInt desiredNumStackPages;
+sqInt extraVMMemory;
 sqInt checkForLeaks;
-sqInt extraVMMemory;
 sqInt desiredCogCodeSize;
 char * breakSelector;
 usqInt heapBase;
@@ -2367,7 +2366,7 @@
 /*560*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
 	};
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1111";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1113";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -22525,31 +22524,45 @@
 }
 
 
-/*	Read an image from the given file stream, allocating the given amount of
-	memory to its object heap. Fail if the image has an unknown format or
-	requires more than the given amount of memory.
- */
-/*	Details: This method detects when the image was stored on a machine with
-	the opposite byte ordering from this machine and swaps the bytes
-	automatically. Furthermore, it allows the header information to start 512
-	bytes into the file, since some file transfer programs for the Macintosh
+/*	Read an image from the given file stream, allocating an amount of memory
+	to its object heap.
+	
+	V3: desiredHeapSize is the total size of the heap. Fail if the image has
+	an unknown format or
+	requires more than the specified amount of memory.
+	
+	Spur: desiredHeapSize is ignored; this routine will attempt to provide at
+	least extraVMMemory's
+	ammount of free space after the image is loaded, taking any free space in
+	teh image into account.
+	extraVMMemory is stored in the image header and is accessible as
+	vmParameterAt: 23. If
+	extraVMMemory is 0, the value defaults to the default grow headroom. Fail
+	if the image has an
+	unknown format or if sufficient memory cannot be allocated.
+	
+	Details: This method detects when the image was stored on a machine with
+	the opposite byte
+	ordering from this machine and swaps the bytes automatically. Furthermore,
+	it allows the header
+	information to start 512 bytes into the file, since some file transfer
+	programs for the Macintosh
 	apparently prepend a Mac-specific header of this size. Note that this same
-	512 bytes of prefix area could also be used to store an exec command on
-	Unix systems, allowing one to launch Smalltalk by invoking the image name
-	as a command.
- */
-/*	This code is based on C code by Ian Piumarta and Smalltalk code by Tim
-	Rowledge. Many thanks to both of you!!
- */
+	512 bytes of prefix
+	area could also be used to store an exec command on Unix systems, allowing
+	one to launch
+	Smalltalk by invoking the image name as a command. */
 
 size_t
 readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squeakFileOffsetType imageOffset)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt actualEdenBytes;
+    usqInt allocationReserve;
     SpurNewSpaceSpace *aNewSpace;
     sqInt anObject;
     sqInt aValue;
     sqInt baseOfHeap;
+    sqInt bit;
     sqInt bytes;
     sqInt bytesRead;
     usqInt bytesToShift;
@@ -22558,6 +22571,7 @@
     size_t dataSize;
     sqInt edenBytes;
     sqInt firstSegSize;
+    sqInt freeOldSpaceInImage;
     sqInt hdrCogCodeSize;
     sqInt hdrEdenBytes;
     sqInt hdrMaxExtSemTabSize;
@@ -22565,7 +22579,10 @@
     sqInt headerFlags;
     sqInt headerSize;
     squeakFileOffsetType headerStart;
+    sqInt headroom;
+    sqInt headroom1;
     usqInt heapSize;
+    usqInt heapSize1;
     sqInt i;
     sqInt i1;
     sqInt i11;
@@ -22574,6 +22591,8 @@
     sqInt i4;
     sqInt iLimiT;
     usqInt limit;
+    sqInt maxFramesPerPage;
+    sqInt maxUsedBytesPerPage;
     sqInt memEnd;
     sqInt memLimit;
     usqInt minimumMemory;
@@ -22587,19 +22606,20 @@
     sqInt survivorBytes;
     sqInt swapBytes;
     sqInt totalBytes;
-    int w;
-    sqInt w1;
-    short w10;
+    sqInt w;
+    int w1;
+    int w10;
     short w11;
-    sqInt w12;
+    short w12;
+    sqInt w13;
     sqInt w2;
     sqInt w3;
     sqInt w4;
     sqInt w5;
     sqInt w6;
-    int w7;
-    short w8;
-    int w9;
+    sqInt w7;
+    int w8;
+    short w9;
 
 
 	/* guess Metaclass instSize */
@@ -22615,51 +22635,51 @@
 
 	headerStart = (sqImageFilePosition(f)) - 4;
 	/* begin getWord32FromFile:swap: */
-	w = 0;
-	sqImageFileRead((&w), sizeof(int), 1, f);
+	w1 = 0;
+	sqImageFileRead((&w1), sizeof(int), 1, f);
 	headerSize = (swapBytes
-		? ((((((usqInt) w >> 24)) & Byte0Mask) + ((((usqInt) w >> 8)) & Byte1Mask)) + ((((usqInt) w << 8)) & Byte2Mask)) + ((((usqInt) w << 24)) & Byte3Mask)
-		: w);
+		? ((((((usqInt) w1 >> 24)) & Byte0Mask) + ((((usqInt) w1 >> 8)) & Byte1Mask)) + ((((usqInt) w1 << 8)) & Byte2Mask)) + ((((usqInt) w1 << 24)) & Byte3Mask)
+		: w1);
 	/* begin getLongFromFile:swap: */
-	w1 = 0;
-	sqImageFileRead((&w1), sizeof(w1), 1, f);
-	dataSize = ((sqInt) ((swapBytes
-	? ((((((usqInt) w1 >> 24)) & Byte0Mask) + ((((usqInt) w1 >> 8)) & Byte1Mask)) + ((((usqInt) w1 << 8)) & Byte2Mask)) + ((((usqInt) w1 << 24)) & Byte3Mask)
-	: w1)));
-	/* begin getLongFromFile:swap: */
 	w2 = 0;
 	sqImageFileRead((&w2), sizeof(w2), 1, f);
-	oldBaseAddr = (swapBytes
-		? ((((((usqInt) w2 >> 24)) & Byte0Mask) + ((((usqInt) w2 >> 8)) & Byte1Mask)) + ((((usqInt) w2 << 8)) & Byte2Mask)) + ((((usqInt) w2 << 24)) & Byte3Mask)
-		: w2);
-	/* begin specialObjectsOop: */
+	dataSize = ((sqInt) ((swapBytes
+	? ((((((usqInt) w2 >> 24)) & Byte0Mask) + ((((usqInt) w2 >> 8)) & Byte1Mask)) + ((((usqInt) w2 << 8)) & Byte2Mask)) + ((((usqInt) w2 << 24)) & Byte3Mask)
+	: w2)));
 	/* begin getLongFromFile:swap: */
 	w3 = 0;
 	sqImageFileRead((&w3), sizeof(w3), 1, f);
-	anObject = (swapBytes
+	oldBaseAddr = (swapBytes
 		? ((((((usqInt) w3 >> 24)) & Byte0Mask) + ((((usqInt) w3 >> 8)) & Byte1Mask)) + ((((usqInt) w3 << 8)) & Byte2Mask)) + ((((usqInt) w3 << 24)) & Byte3Mask)
 		: w3);
-	GIV(specialObjectsOop) = anObject;
-	/* begin lastHash: */
+	/* begin specialObjectsOop: */
 	/* begin getLongFromFile:swap: */
 	w4 = 0;
 	sqImageFileRead((&w4), sizeof(w4), 1, f);
-	seed = (swapBytes
+	anObject = (swapBytes
 		? ((((((usqInt) w4 >> 24)) & Byte0Mask) + ((((usqInt) w4 >> 8)) & Byte1Mask)) + ((((usqInt) w4 << 8)) & Byte2Mask)) + ((((usqInt) w4 << 24)) & Byte3Mask)
 		: w4);
-	GIV(lastHash) = seed;
+	GIV(specialObjectsOop) = anObject;
+	/* begin lastHash: */
 	/* begin getLongFromFile:swap: */
 	w5 = 0;
 	sqImageFileRead((&w5), sizeof(w5), 1, f);
-	GIV(savedWindowSize) = (swapBytes
+	seed = (swapBytes
 		? ((((((usqInt) w5 >> 24)) & Byte0Mask) + ((((usqInt) w5 >> 8)) & Byte1Mask)) + ((((usqInt) w5 << 8)) & Byte2Mask)) + ((((usqInt) w5 << 24)) & Byte3Mask)
 		: w5);
+	GIV(lastHash) = seed;
 	/* begin getLongFromFile:swap: */
 	w6 = 0;
 	sqImageFileRead((&w6), sizeof(w6), 1, f);
-	headerFlags = (swapBytes
+	GIV(savedWindowSize) = (swapBytes
 		? ((((((usqInt) w6 >> 24)) & Byte0Mask) + ((((usqInt) w6 >> 8)) & Byte1Mask)) + ((((usqInt) w6 << 8)) & Byte2Mask)) + ((((usqInt) w6 << 24)) & Byte3Mask)
 		: w6);
+	/* begin getLongFromFile:swap: */
+	w7 = 0;
+	sqImageFileRead((&w7), sizeof(w7), 1, f);
+	headerFlags = (swapBytes
+		? ((((((usqInt) w7 >> 24)) & Byte0Mask) + ((((usqInt) w7 >> 8)) & Byte1Mask)) + ((((usqInt) w7 << 8)) & Byte2Mask)) + ((((usqInt) w7 << 24)) & Byte3Mask)
+		: w7);
 	/* begin setImageHeaderFlagsFrom: */
 
 	/* so as to preserve unrecognised flags. */
@@ -22675,17 +22695,17 @@
 	GIV(noThreadingOfGUIThread) = (headerFlags & 32) != 0;
 	
 	/* begin getWord32FromFile:swap: */
-	w7 = 0;
-	sqImageFileRead((&w7), sizeof(int), 1, f);
+	w8 = 0;
+	sqImageFileRead((&w8), sizeof(int), 1, f);
 	extraVMMemory = (swapBytes
-		? ((((((usqInt) w7 >> 24)) & Byte0Mask) + ((((usqInt) w7 >> 8)) & Byte1Mask)) + ((((usqInt) w7 << 8)) & Byte2Mask)) + ((((usqInt) w7 << 24)) & Byte3Mask)
-		: w7);
+		? ((((((usqInt) w8 >> 24)) & Byte0Mask) + ((((usqInt) w8 >> 8)) & Byte1Mask)) + ((((usqInt) w8 << 8)) & Byte2Mask)) + ((((usqInt) w8 << 24)) & Byte3Mask)
+		: w8);
 	/* begin getShortFromFile:swap: */
-	w8 = 0;
-	sqImageFileRead((&w8), sizeof(short), 1, f);
+	w9 = 0;
+	sqImageFileRead((&w9), sizeof(short), 1, f);
 	hdrNumStackPages = (swapBytes
-		? ((((((usqInt) w8 >> 24)) & Byte0Mask) + ((((usqInt) w8 >> 8)) & Byte1Mask)) + ((((usqInt) w8 << 8)) & Byte2Mask)) + ((((usqInt) w8 << 24)) & Byte3Mask)
-		: w8);
+		? ((((((usqInt) w9 >> 24)) & Byte0Mask) + ((((usqInt) w9 >> 8)) & Byte1Mask)) + ((((usqInt) w9 << 8)) & Byte2Mask)) + ((((usqInt) w9 << 24)) & Byte3Mask)
+		: w9);
 	GIV(numStackPages) = (desiredNumStackPages != 0
 		? desiredNumStackPages
 		: (hdrNumStackPages == 0
@@ -22702,11 +22722,11 @@
 				? defaultCogCodeSize()
 				: hdrCogCodeSize));
 	/* begin getWord32FromFile:swap: */
-	w9 = 0;
-	sqImageFileRead((&w9), sizeof(int), 1, f);
+	w10 = 0;
+	sqImageFileRead((&w10), sizeof(int), 1, f);
 	hdrEdenBytes = (swapBytes
-		? ((((((usqInt) w9 >> 24)) & Byte0Mask) + ((((usqInt) w9 >> 8)) & Byte1Mask)) + ((((usqInt) w9 << 8)) & Byte2Mask)) + ((((usqInt) w9 << 24)) & Byte3Mask)
-		: w9);
+		? ((((((usqInt) w10 >> 24)) & Byte0Mask) + ((((usqInt) w10 >> 8)) & Byte1Mask)) + ((((usqInt) w10 << 8)) & Byte2Mask)) + ((((usqInt) w10 << 24)) & Byte3Mask)
+		: w10);
 	/* begin edenBytes: */
 	bytes = (desiredEdenBytes != 0
 		? desiredEdenBytes
@@ -22716,41 +22736,81 @@
 	edenBytes = bytes;
 	desiredEdenBytes = hdrEdenBytes;
 	/* begin getShortFromFile:swap: */
-	w10 = 0;
-	sqImageFileRead((&w10), sizeof(short), 1, f);
+	w11 = 0;
+	sqImageFileRead((&w11), sizeof(short), 1, f);
 	hdrMaxExtSemTabSize = (swapBytes
-		? ((((((usqInt) w10 >> 24)) & Byte0Mask) + ((((usqInt) w10 >> 8)) & Byte1Mask)) + ((((usqInt) w10 << 8)) & Byte2Mask)) + ((((usqInt) w10 << 24)) & Byte3Mask)
-		: w10);
+		? ((((((usqInt) w11 >> 24)) & Byte0Mask) + ((((usqInt) w11 >> 8)) & Byte1Mask)) + ((((usqInt) w11 << 8)) & Byte2Mask)) + ((((usqInt) w11 << 24)) & Byte3Mask)
+		: w11);
 	if (hdrMaxExtSemTabSize != 0) {
 		/* begin setMaxExtSemSizeTo: */
 		GIV(maxExtSemTabSizeSet) = 1;
 		ioSetMaxExtSemTableSize(hdrMaxExtSemTabSize);
 	}
 	/* begin getShortFromFile:swap: */
-	w11 = 0;
-	sqImageFileRead((&w11), sizeof(short), 1, f);
+	w12 = 0;
+	sqImageFileRead((&w12), sizeof(short), 1, f);
 	GIV(the2ndUnknownShort) = (swapBytes
-		? ((((((usqInt) w11 >> 24)) & Byte0Mask) + ((((usqInt) w11 >> 8)) & Byte1Mask)) + ((((usqInt) w11 << 8)) & Byte2Mask)) + ((((usqInt) w11 << 24)) & Byte3Mask)
-		: w11);
+		? ((((((usqInt) w12 >> 24)) & Byte0Mask) + ((((usqInt) w12 >> 8)) & Byte1Mask)) + ((((usqInt) w12 << 8)) & Byte2Mask)) + ((((usqInt) w12 << 24)) & Byte3Mask)
+		: w12);
 	/* begin getLongFromFile:swap: */
-	w12 = 0;
-	sqImageFileRead((&w12), sizeof(w12), 1, f);
+	w13 = 0;
+	sqImageFileRead((&w13), sizeof(w13), 1, f);
 	firstSegSize = (swapBytes
-		? ((((((usqInt) w12 >> 24)) & Byte0Mask) + ((((usqInt) w12 >> 8)) & Byte1Mask)) + ((((usqInt) w12 << 8)) & Byte2Mask)) + ((((usqInt) w12 << 24)) & Byte3Mask)
-		: w12);
+		? ((((((usqInt) w13 >> 24)) & Byte0Mask) + ((((usqInt) w13 >> 8)) & Byte1Mask)) + ((((usqInt) w13 << 8)) & Byte2Mask)) + ((((usqInt) w13 << 24)) & Byte3Mask)
+		: w13);
 	/* begin firstSegmentSize: */
 	GIV(firstSegmentSize) = firstSegSize;
+	/* begin interpreterAllocationReserveBytes */
+	maxUsedBytesPerPage = (512) + ((IFrameSlots + 64) * BytesPerWord);
+	maxFramesPerPage = (maxUsedBytesPerPage / BytesPerWord) / MFrameSlots;
+	allocationReserve = ((maxFramesPerPage * LargeContextSlots) * BytesPerOop) * GIV(numStackPages);
 
 	/* no need to include the stackZone; this is alloca'ed */
 
-	minimumMemory = ((GIV(cogCodeSize) + dataSize) + edenBytes) + (interpreterAllocationReserveBytes());
+	minimumMemory = ((GIV(cogCodeSize) + dataSize) + edenBytes) + allocationReserve;
+	/* begin getLongFromFile:swap: */
+	w = 0;
+	sqImageFileRead((&w), sizeof(w), 1, f);
+	freeOldSpaceInImage = (swapBytes
+		? ((((((usqInt) w >> 24)) & Byte0Mask) + ((((usqInt) w >> 8)) & Byte1Mask)) + ((((usqInt) w << 8)) & Byte2Mask)) + ((((usqInt) w << 24)) & Byte3Mask)
+		: w);
+	/* begin initialHeadroom:givenFreeOldSpaceInImage: */
+	headroom1 = (extraVMMemory == 0
+		? (!(GIV(growHeadroom))
+				? (16 * 1024) * 1024
+				: GIV(growHeadroom))
+		: extraVMMemory);
+	if (freeOldSpaceInImage >= headroom1) {
+		headroom = 0;
+		goto l1;
+	}
+	if (freeOldSpaceInImage >= ((headroom1 * 7) / 8)) {
+		headroom = headroom1 / 8;
+		goto l1;
+	}
+	if (freeOldSpaceInImage >= ((headroom1 * 3) / 4)) {
+		headroom = headroom1 / 4;
+		goto l1;
+	}
+	if (freeOldSpaceInImage >= ((headroom1 * 5) / 8)) {
+		headroom = (headroom1 * 3) / 8;
+		goto l1;
+	}
+	if (freeOldSpaceInImage >= (headroom1 / 2)) {
+		headroom = headroom1 / 2;
+		goto l1;
+	}
+	headroom = headroom1;
+l1:	/* end initialHeadroom:givenFreeOldSpaceInImage: */;
+	/* begin roundUpHeapSize: */
+	heapSize1 = (((GIV(cogCodeSize) + dataSize) + headroom) + edenBytes) + ((headroom > allocationReserve
+	? 0
+	: allocationReserve));
+	bit = (((highBit(heapSize1)) - 1) * 3) / 4;
+	heapSize = (heapSize1 & ((1 << bit) - 1)
+		? (((heapSize1 | ((1 << bit) - 1)) - ((1 << bit) - 1))) + (1 << bit)
+		: heapSize1);
 
-	/* no need to include the stackZone; this is alloca'ed */
-
-	heapSize = ((GIV(cogCodeSize) + desiredHeapSize) + edenBytes) + (interpreterAllocationReserveBytes());
-	if (heapSize < minimumMemory) {
-		insufficientMemorySpecifiedError();
-	}
 	/* begin memory: */
 	aValue = ((usqInt)(allocateMemoryminimumimageFileheaderSize(heapSize, minimumMemory, f, headerSize)));
 	GIV(memory) = aValue;
@@ -29644,7 +29704,7 @@
 				GIV(needGCFlag) = 1;
 				forceInterruptCheck();
 			}
-			s = allocateSlotsInOldSpacebytesformatclassIndex(numSlots, numBytes, formatField, ClassByteStringCompactIndex);
+			s = ((usqInt) (allocateSlotsInOldSpacebytesformatclassIndex(numSlots, numBytes, formatField, ClassByteStringCompactIndex)));
 			goto l1;
 		}
 		if (numSlots >= 0xFF) {
@@ -35024,7 +35084,7 @@
     sqInt err;
     sqInt hash;
     sqInt instSpec;
-    sqInt newObj;
+    usqInt newObj;
     usqInt newObj1;
     usqInt numBytes;
     sqInt numSlots;
@@ -35139,7 +35199,7 @@
     sqInt i;
     sqInt instSpec;
     sqInt literalCount;
-    sqInt newObj;
+    usqInt newObj;
     usqInt newObj1;
     usqInt numBytes;
     sqInt numSlots;
@@ -40931,7 +40991,7 @@
     sqInt fillValue;
     sqInt hash;
     sqInt instSpec;
-    sqInt newObj;
+    usqInt newObj;
     usqInt newObj1;
     usqInt numBytes;
     usqInt numSlots;
@@ -42800,7 +42860,7 @@
     sqInt entry;
     sqInt expectedIndex;
     sqInt expectedIndex1;
-    sqInt freeChunk;
+    usqInt freeChunk;
     sqInt i;
     sqInt i1;
     sqInt index;
@@ -42839,7 +42899,7 @@
     sqInt ptr1;
     sqInt ptr2;
     sqInt slotBytes;
-    sqInt smallObj;
+    usqInt smallObj;
     sqInt start;
 
 	classIndex = (long32At(aClass + 4)) & 0x3FFFFF;
@@ -45774,7 +45834,7 @@
     sqInt fmt;
     sqInt hasYoung;
     sqInt i;
-    sqInt newObj;
+    usqInt newObj;
     usqInt newObj1;
     usqInt numBytes;
     usqInt numSlots;
@@ -59986,8 +60046,8 @@
     sqInt prevPrevObj;
     sqInt prevPrevObj1;
     sqInt ptr;
-    sqInt savedInHashes;
-    sqInt savedOutHashes;
+    usqInt savedInHashes;
+    usqInt savedOutHashes;
     sqInt segAddr;
     sqInt segStart;
     sqInt slotBytes;
@@ -60454,13 +60514,13 @@
 /*	Answer a new String copied from a null-terminated C string,
 	or nil if out of memory. */
 
-sqInt
+usqInt
 stringForCString(const char *aCString)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt formatField;
     sqInt len;
     usqInt newObj;
-    sqInt newString;
+    usqInt newString;
     usqInt numBytes;
     sqInt numSlots;
 
@@ -61376,7 +61436,7 @@
     sqInt largeChild;
     sqInt newEndOfMemory;
     sqInt next;
-    usqInt node;
+    sqInt node;
     SpurSegmentInfo *seg;
     sqInt smallChild;
     sqInt treeNode;
@@ -63428,26 +63488,6 @@
 }
 
 
-/*	Dump the entire image out to the given file. Intended for debugging only. */
-
-EXPORT(sqInt)
-dumpImage(sqInt fileName)
-{
-    usqInt dataSize;
-    sqImageFile f;
-    sqInt result;
-
-	f = sqImageFileOpen(pointerForOop(fileName), "wb");
-	if (f == null) {
-		return -1;
-	}
-	dataSize = (endOfMemory()) - (startOfMemory());
-	result = sqImageFileWrite(pointerForOop(memory()), sizeof(unsigned char), dataSize, f);
-	sqImageFileClose(f);
-	return result;
-}
-
-
 /*	This is used to implement outer sends and outer expressions in Newspeak. */
 
 static sqInt
@@ -78327,7 +78367,6 @@
 void* vm_exports[][3] = {
 	{"", "callbackEnter", (void*)callbackEnter},
 	{"", "callbackLeave", (void*)callbackLeave},
-	{"", "dumpImage", (void*)dumpImage},
 	{"", "moduleUnloaded", (void*)moduleUnloaded},
 	{"", "primitiveAddLargeIntegers\000\377", (void*)primitiveAddLargeIntegers},
 	{"", "primitiveAllInstances\000\377", (void*)primitiveAllInstances},

Modified: branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
===================================================================
--- branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c	2015-03-23 05:44:52 UTC (rev 3283)
+++ branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c	2015-03-23 20:04:06 UTC (rev 3284)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1111 uuid: d49aabf6-9652-4eaf-b08d-0ccddc9c9146
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1113 uuid: 9b08eea7-d3db-440f-ba64-16abc799fcf8
    from
-	StackInterpreter VMMaker.oscog-eem.1111 uuid: d49aabf6-9652-4eaf-b08d-0ccddc9c9146
+	StackInterpreter VMMaker.oscog-eem.1113 uuid: 9b08eea7-d3db-440f-ba64-16abc799fcf8
  */
-static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1111 uuid: d49aabf6-9652-4eaf-b08d-0ccddc9c9146 " __DATE__ ;
+static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1113 uuid: 9b08eea7-d3db-440f-ba64-16abc799fcf8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1014,7 +1014,6 @@
 static sqInt doPrimitiveModby(sqInt rcvr, sqInt arg) NoDbgRegParms;
 sqInt doSignalSemaphoreWithIndex(sqInt index);
 static void dummyReferToProxy(void);
-EXPORT(sqInt) dumpImage(sqInt fileName);
 void dumpPrimTraceLog(void);
 static sqInt enclosingObjectAtwithObjectwithMixin(sqInt depth, sqInt methodReceiver, sqInt methodMixin) NoDbgRegParms;
 static sqInt ensureCallerContext(char *theFP) NoDbgRegParms;
@@ -1387,8 +1386,8 @@
 _iss sqInt numClassTablePages;
 _iss sqInt classTableIndex;
 _iss SpurNewSpaceSpace futureSpace;
+_iss sqInt numStackPages;
 _iss sqInt numRememberedEphemerons;
-_iss sqInt numStackPages;
 _iss sqInt jmpDepth;
 _iss sqInt futureSurvivorStart;
 _iss sqLong nextProfileTick;
@@ -1400,10 +1399,10 @@
 _iss sqInt numPages;
 _iss sqInt tenureThreshold;
 _iss sqInt extraRootCount;
+_iss sqInt growHeadroom;
 _iss sqInt invalidObjStackPage;
 _iss sqInt previousRememberedSetSize;
 _iss sqInt classNameIndex;
-_iss sqInt growHeadroom;
 _iss sqInt becomeEffectsFlags;
 _iss sqInt ephemeronQueue;
 _iss sqInt lastMethodCacheProbeWrite;
@@ -2113,7 +2112,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1111";
+const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1113";
 volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -49908,26 +49907,6 @@
 }
 
 
-/*	Dump the entire image out to the given file. Intended for debugging only. */
-
-EXPORT(sqInt)
-dumpImage(sqInt fileName)
-{
-    usqInt dataSize;
-    sqImageFile f;
-    sqInt result;
-
-	f = sqImageFileOpen(pointerForOop(fileName), "wb");
-	if (f == null) {
-		return -1;
-	}
-	dataSize = (endOfMemory()) - (startOfMemory());
-	result = sqImageFileWrite(pointerForOop(memory()), sizeof(unsigned char), dataSize, f);
-	sqImageFileClose(f);
-	return result;
-}
-
-
 /*	Dummy definition to allow the StackInterpreter to link against the Cog
 	run-time. 
  */
@@ -59158,31 +59137,45 @@
 }
 
 
-/*	Read an image from the given file stream, allocating the given amount of
-	memory to its object heap. Fail if the image has an unknown format or
-	requires more than the given amount of memory.
- */
-/*	Details: This method detects when the image was stored on a machine with
-	the opposite byte ordering from this machine and swaps the bytes
-	automatically. Furthermore, it allows the header information to start 512
-	bytes into the file, since some file transfer programs for the Macintosh
+/*	Read an image from the given file stream, allocating an amount of memory
+	to its object heap.
+	
+	V3: desiredHeapSize is the total size of the heap. Fail if the image has
+	an unknown format or
+	requires more than the specified amount of memory.
+	
+	Spur: desiredHeapSize is ignored; this routine will attempt to provide at
+	least extraVMMemory's
+	ammount of free space after the image is loaded, taking any free space in
+	teh image into account.
+	extraVMMemory is stored in the image header and is accessible as
+	vmParameterAt: 23. If
+	extraVMMemory is 0, the value defaults to the default grow headroom. Fail
+	if the image has an
+	unknown format or if sufficient memory cannot be allocated.
+	
+	Details: This method detects when the image was stored on a machine with
+	the opposite byte
+	ordering from this machine and swaps the bytes automatically. Furthermore,
+	it allows the header
+	information to start 512 bytes into the file, since some file transfer
+	programs for the Macintosh
 	apparently prepend a Mac-specific header of this size. Note that this same
-	512 bytes of prefix area could also be used to store an exec command on
-	Unix systems, allowing one to launch Smalltalk by invoking the image name
-	as a command.
- */
-/*	This code is based on C code by Ian Piumarta and Smalltalk code by Tim
-	Rowledge. Many thanks to both of you!!
- */

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list