[Vm-dev] [commit][2764] Merge 2763. -memory and SQUEAK_MEMORY handle more than 31 bits of extra memory

commits at squeakvm.org commits at squeakvm.org
Mon Aug 12 17:08:03 UTC 2013


Revision: 2764
Author:   eliot
Date:     2013-08-12 10:08:01 -0700 (Mon, 12 Aug 2013)
Log Message:
-----------
Merge 2763.  -memory and SQUEAK_MEMORY handle more than 31 bits of extra memory
on 64-bit architectures.

Modified Paths:
--------------
    branches/Cog/platforms/unix/vm/sqUnixMain.c

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


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Thu Aug  1 14:57:46 PDT 2013
   + Mon Aug 12 10:07:26 PDT 2013

Modified: branches/Cog/platforms/unix/vm/sqUnixMain.c
===================================================================
--- branches/Cog/platforms/unix/vm/sqUnixMain.c	2013-08-10 23:30:28 UTC (rev 2763)
+++ branches/Cog/platforms/unix/vm/sqUnixMain.c	2013-08-12 17:08:01 UTC (rev 2764)
@@ -103,7 +103,7 @@
 static int    squeakArgCnt=	0;
 static char **squeakArgVec=	0;
 
-static int    extraMemory=	0;
+static long   extraMemory=	0;
        int    useMmap=		DefaultMmapSize * 1024 * 1024;
 
 static int    useItimer=	1;	/* 0 to disable itimer-based clock */
@@ -1195,7 +1195,7 @@
 static int strtobkm(const char *str)
 {
   char *suffix;
-  int value= strtol(str, &suffix, 10);
+  long value= strtol(str, &suffix, 10);
   switch (*suffix)
     {
     case 'k': case 'K':
@@ -1703,11 +1703,11 @@
       if (extraMemory)
 	useMmap= 0;
       else
-	extraMemory= DefaultHeapSize * 1024 *1024;
+	extraMemory= DefaultHeapSize * 1024 * 1024;
 #    ifdef DEBUG_IMAGE
-      printf("image size %d + heap size %d (useMmap = %d)\n", (int)sb.st_size, extraMemory, useMmap);
+      printf("image size %ld + heap size %ld (useMmap = %d)\n", (long)sb.st_size, extraMemory, useMmap);
 #    endif
-      extraMemory += (int)sb.st_size;
+      extraMemory += (long)sb.st_size;
       readImageFromFileHeapSizeStartingAt(f, extraMemory, 0);
       sqImageFileClose(f);
       break;



More information about the Vm-dev mailing list