<br><br><div class="gmail_quote">On Wed, Dec 1, 2010 at 2:09 AM, John M McIntosh <span dir="ltr">&lt;<a href="mailto:johnmci@smalltalkconsulting.com">johnmci@smalltalkconsulting.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
If you are compiling your own macintosh VM </blockquote><div><br>Thanks John for the answer. Yes, I am compiling my own, but the problem is present with the standard vm also. I answer above....<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
then go look at<br>
sqSqueakOSXApplication.m<br>
<br>
- (NSInteger) parseArgument: (NSString *) argData peek: (NSString *) peek {<br>
...<br>
        if ([argData compare: @&quot;-memory&quot;] == NSOrderedSame) {<br>
                gMaxHeapSize = (usqInt) [self strtobkm: [peek UTF8String]];<br>
                return 2;<br>
        }<br>
        return 0;<br>
}<br>
<br></blockquote><div><br><br>I tried this passing -memory 1500m.  The value is get and set correct here. <br>So, after this, we have:<br>gMaxHeapSize = 1572864000<br><br><br>The problem is that after, when you choose the image to start, and the function sqAllocateMemoryMac is called, gMaxHeapSize lost the value passes by -memory and has again the default.<br>
So, in this case, when this function is called, <br><br>gMaxHeapSize = 536870912<br><br>and not 1572864000<br><br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

and follow the bouncing gMaxHeapSize to see what happens.<br>
You&#39;ll find the use at<br>
         startOfmmapForANONMemory = mmap(startOfAnonymousMemory, freeSpaceRoundedUpToPageSize, PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED,0,(off_t)0);<br>
<br>
in sqMacV2Memory.c<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div><br><br>Here it doesn&#39;t pass because the big if<br>    if (gSqueakUseFileMappedMMAP) {<br>returns 0 since this is the value it has in the Info.plist<br>
<br>What is that if I set a special value in SqueakMaxHeapSize (1572864000) weird is that enabling or not that value, I have more or less the same results:<br><br>gSqueakUseFileMappedMMAP  -&gt;   0<br>Smalltalk garbageCollect  1505201876<br>
<br>gSqueakUseFileMappedMMAP  -&gt;   1<br>Smalltalk garbageCollect  1505199640<br><br>But in one case the <br>startOfmmapForANONMemory = mmap(startOfAnonymousMemory, freeSpaceRoundedUpToPageSize, PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED,0,(off_t)0);<br>
<br>is executed and in other one no.<br><br><br>Thanks in advance,<br><br>Mariano<br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div class="h5">
<br>
On 2010-11-30, at 5:03 PM, David T. Lewis wrote:<br>
<br>
&gt;<br>
&gt; On Wed, Dec 01, 2010 at 12:41:44AM +0100, Mariano Martinez Peck wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Wed, Dec 1, 2010 at 12:11 AM, Mariano Martinez Peck &lt;<br>
&gt;&gt; <a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Tue, Nov 30, 2010 at 5:14 PM, David T. Lewis &lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>&gt;wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I&#39;m away and cannot check this right now, but if you look in the<br>
&gt;&gt;&gt;&gt; SqS/VMMaker archive there there are a number of recent updates that<br>
&gt;&gt;&gt;&gt; may address this problem. See the Montecello update comments for<br>
&gt;&gt;&gt;&gt; VMMaker-dtl.188, VMMaker-dtl.199, and VMMaker-dtl.200 for summaries.<br>
&gt;&gt;&gt;&gt; These updates would not be in any of the released VMs at this point,<br>
&gt;&gt;&gt;&gt; but I have a hunch that they will take care of this problem.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi Dave. Ok...after a couple of hours I could compile a new VM for MacOS<br>
&gt;&gt;&gt; with VMMaker 205 and integrating all my changes :)<br>
&gt;&gt;&gt; So....this was something I have to do since several months already hehhehe<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Now, as you guessed, something  was related to that. Now, these are the<br>
&gt;&gt;&gt; results:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; normal:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Smalltalk garbageCollect   481957728<br>
&gt;&gt;&gt; Smalltalk primBytesLeft 5738200<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; with -memory 1500m<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Smalltalk garbageCollect    482093452<br>
&gt;&gt;&gt; Smalltalk primBytesLeft 6444200<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; mmmmmmm  if instead of sending -memory I modify Info.plist  and I set<br>
&gt;&gt; 1572864000  (1500gb)<br>
&gt;&gt; then I get<br>
&gt;&gt;<br>
&gt;&gt; Smalltalk garbageCollect  1518058920<br>
&gt;&gt; Smalltalk primBytesLeft 5898636<br>
&gt;&gt;<br>
&gt;&gt; :)<br>
&gt;&gt;<br>
&gt;&gt; so maybe the mac vm is not taking into acount -memory but it does the file?<br>
&gt;<br>
&gt; Well that&#39;s as good a theory as anything I could have made up ;-)<br>
&gt;<br>
&gt; To be serious, the -memory parameter is part of the unix VM, and<br>
&gt; other platforms may do things differently. So yes, I think you<br>
&gt; have found the right explanation.<br>
&gt;<br>
&gt; Dave<br>
&gt;<br>
&gt;<br>
<br>
</div></div><font color="#888888">--<br>
===========================================================================<br>
John M. McIntosh &lt;<a href="mailto:johnmci@smalltalkconsulting.com">johnmci@smalltalkconsulting.com</a>&gt;   Twitter:  squeaker68882<br>
Corporate Smalltalk Consulting Ltd.  <a href="http://www.smalltalkconsulting.com" target="_blank">http://www.smalltalkconsulting.com</a><br>
===========================================================================<br>
<br>
<br>
<br>
<br>
</font></blockquote></div><br>