<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    FWIW, the reason for the 512MB limit has to do with Windows memory
    layout. When you're running applications that load dynamic libraries
    (directly or indirectly such as when using ODBC which loads further
    DLLs) Windows needs (sometimes a lot of) address space to map these
    DLLs in order to load them[*]. When the VM starts it grabs
    MAX_VIRTUAL_MEMORY from the OS which will consequently not be
    available to map DLLs into. We have found that depending on the
    libraries in use and depending on the overall system utilization,
    loading DLLs would fail seemingly "at random" which, after further
    investigation, we were able to track to reserving too much address
    space upfront. We were able to show experimentally, that changing
    the limit from 1GB to 512MB would on some machines make all the
    difference.<br>
    <br>
    [*] This is true in particular for libraries that create more
    threads as the default Windows policy is to create threads with the
    stack size of the application executable. Thus a 1MB default stack
    in the application will by default create all further threads to be
    allocated with a 1MB stack size. Of course all of this is subject to
    various other conditions.<br>
    <br>
    In the end we concluded that 512MB is a reasonable size for most
    apps and with 512MB we've never seen these random failures. You can
    increase the limit by recompiling the VM, but if you ship your app
    in diverse environments you should be aware of the potential issues.<br>
    <br>
    Cheers,<br>
    &nbsp; - Andreas<br>
    <br>
    On 4/21/2011 22:44, Alain_Rastoul wrote:
    <blockquote cite="mid:ioq504$joe$1@dough.gmane.org" type="cite">
      <pre wrap=""> </pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <meta name="GENERATOR" content="MSHTML 8.00.6001.19046">
      <style></style>
      <div><font size="2" face="Arial">Apparently, the vm allocates
          MAX_VIRTUAL_MEMORY and reduces by steps of 128M until it </font></div>
      <div><font size="2" face="Arial">succeeds.</font></div>
      <div><font size="2" face="Arial">so I suppose it could be possible
          to allocate 2Gb and see how it runs on a 1Gb system and if
          this is not too much stress for</font></div>
      <div><font size="2" face="Arial">the system (thinking of the
          pagefile) ?</font></div>
      <div><font size="2" face="Arial">Tudor is your vm a cog or non cog
          vm ?</font></div>
      <div>&nbsp;</div>
      <blockquote style="border-left: 2px solid rgb(0, 0, 0);
        padding-left: 5px; padding-right: 0px; margin-left: 5px;
        margin-right: 0px;">
        <div>"Mariano Martinez Peck" &lt;<a moz-do-not-send="true"
            href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt;
          a &eacute;crit dans le message de news: <a moz-do-not-send="true"
            href="mailto:BANLkTi=Tved13_KL7quOzemOXPnCcfWw+g@mail.gmail.com">BANLkTi=Tved13_KL7quOzemOXPnCcfWw+g@mail.gmail.com</a>...</div>
        <p> </p>
        <hr> <br>
        <br>
        <div class="gmail_quote">On Thu, Apr 21, 2011 at 10:21 PM, Tudor
          Girba <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:tudor.girba@gmail.com">tudor.girba@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote style="border-left: 1px solid rgb(204, 204, 204);
            margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"
            class="gmail_quote">Hi,<br>
            <br>
            Should I to understand that the only way to enable more
            memory is to recompile the VM? Does that mean that there is
            no way to pass this information as a parameter like we can
            on Mac?<br>
            <br>
          </blockquote>
          <div><br>
            As far as I know you can pass a parameter, but even so, it
            won't be able to allocate more than 512MB.<br>
            I can compile the VM for you with this change in 5 minutes.
            But I am not sure that such simple code would make it work.
            I think such limit is there because of something. Otherwise,
            it sounds stupid imposing a limit just because.<br>
            <br>
          </div>
          <blockquote style="border-left: 1px solid rgb(204, 204, 204);
            margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"
            class="gmail_quote">The problem is that I cannot recompile
            the VM because I have no access to a Windows machine. Is
            there one available that provides more memory?<br>
            <br>
          </blockquote>
          <div><br>
            I don't think so, but start cc'ing the VM mailing list.
            You'd probably receive more help.<br>
            <br>
            Cheers<br>
            <br>
            Mariano<br>
            &nbsp;</div>
          <blockquote style="border-left: 1px solid rgb(204, 204, 204);
            margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"
            class="gmail_quote">Cheers,<br>
            Doru<br>
            <div>
              <div class="h5"><br>
                <br>
                On 21 Apr 2011, at 22:09, Alain_Rastoul wrote:<br>
                <br>
                &gt; Hi Tudor,<br>
                &gt;<br>
                &gt; There is a constant in sqWin32Alloc.h
                (platforms\win32\vm) :<br>
                &gt; #define MAX_VIRTUAL_MEMORY 512*1024*1024<br>
                &gt; you can change it to whatever you want and rebuild
                the vm,<br>
                &gt; for exzmple give all the available memory less 256
                M .<br>
                &gt;<br>
                &gt; HTH<br>
                &gt;<br>
                &gt; Regards<br>
                &gt; Alain<br>
                &gt;<br>
                &gt; "Tudor Girba" &lt;<a moz-do-not-send="true"
                  href="mailto:tudor.girba@gmail.com">tudor.girba@gmail.com</a>&gt;
                a &eacute;crit<br>
                &gt; dans le message de news:
                <a class="moz-txt-link-abbreviated" href="mailto:03B9389F-C719-44D0-B106-2AC78B120F56@gmail.com">03B9389F-C719-44D0-B106-2AC78B120F56@gmail.com</a>...<br>
                &gt; Hi,<br>
                &gt;<br>
                &gt; We have no specific startUp: methods in Moose. In
                any case, the issue with<br>
                &gt; opening the image does not seem to be related to
                startUp:.<br>
                &gt;<br>
                &gt; Is it really true that the Cog VM is limited to
                512MB of memory?<br>
                &gt;<br>
                &gt; Cheers,<br>
                &gt; Doru<br>
                &gt;<br>
                &gt;<br>
                &gt; On 21 Apr 2011, at 14:27, Luc Fabresse wrote:<br>
                &gt;<br>
                &gt;&gt; Hi Doru,<br>
                &gt;&gt;<br>
                &gt;&gt; 2011/4/21 Tudor Girba<br>
                &gt;&gt; &lt;<a moz-do-not-send="true"
                  href="mailto:tudor.girba@gmail.com">tudor.girba@gmail.com</a>&gt;<br>
                &gt;&gt; Hi,<br>
                &gt;&gt;<br>
                &gt;&gt;<br>
                &gt;&gt;<br>
                &gt;&gt; On Apr 21, 2011, at 14:06, Mariano Martinez
                Peck<br>
                &gt;&gt; &lt;<a moz-do-not-send="true"
                  href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt;
                wrote:<br>
                &gt;&gt;<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; On Thu, Apr 21, 2011 at 1:58 PM, Tudor
                Girba<br>
                &gt;&gt;&gt; &lt;<a moz-do-not-send="true"
                  href="mailto:tudor.girba@gmail.com">tudor.girba@gmail.com</a>&gt;
                wrote:<br>
                &gt;&gt;&gt;&gt; Hi again,<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; I did not say what the problem was :).
                The problem was that when<br>
                &gt;&gt;&gt;&gt; opening the image on Windows, he got a
                Space is low message and the<br>
                &gt;&gt;&gt;&gt; image was not usable (see attachment).<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; That's weird. Does moose have something on
                the startup list? &nbsp; something<br>
                &gt;&gt;&gt; that can be bothering there?<br>
                &gt;&gt;<br>
                &gt;&gt; Not that I know of. Is there a way to check
                this?<br>
                &gt;&gt;<br>
                &gt;&gt; Classes should be registered using Smalltlak
                addToStartUpList: aClass<br>
                &gt;&gt; Then aClass class&gt;&gt;#startUp: is executed
                at startup.<br>
                &gt;&gt; So implementors of #startUp: on Moose classes
                should give you the answer.<br>
                &gt;&gt;<br>
                &gt;&gt; #Luc<br>
                &gt;&gt;<br>
                &gt;&gt;<br>
                &gt;&gt; Actually, using exactly the same process some
                days ago he produced an<br>
                &gt;&gt; image of 190MB. This one works just fine on
                Windows. The only difference<br>
                &gt;&gt; between the two is the size of the loaded data.<br>
                &gt;&gt;<br>
                &gt;&gt; It would be really bad news if the Windows vm
                would be so severely limited<br>
                &gt;&gt; in terms of memory.<br>
                &gt;&gt;<br>
                &gt;&gt; Cheers,<br>
                &gt;&gt; Doru<br>
                &gt;&gt;<br>
                &gt;&gt;<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; On Mac it worked just fine.<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; Cheers,<br>
                &gt;&gt;&gt;&gt; Doru<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; On 21 Apr 2011, at 12:52, Tudor Girba
                wrote:<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; Hi,<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; I received a question from someone
                running a 200MB image on Windows<br>
                &gt;&gt;&gt;&gt;&gt; using Cog 2361.<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; If I open the image on Mac, it
                works just fine. Unfortunately, I do<br>
                &gt;&gt;&gt;&gt;&gt; not have a Windows machine around,
                and I cannot test but I believe it<br>
                &gt;&gt;&gt;&gt;&gt; should be solvable by increasing
                the allocated memory.<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; On Mac, I would run it with:
                ./Croquet -memory 1500m<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; Can anyone help me with the right
                incantation for Windows?<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; Cheers,<br>
                &gt;&gt;&gt;&gt;&gt; Doru<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; --<br>
                &gt;&gt;&gt;&gt;&gt; <a moz-do-not-send="true"
                  href="http://www.tudorgirba.com" target="_blank">www.tudorgirba.com</a><br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; "What we can governs what we wish."<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; &lt;Space is low.png&gt;<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; --<br>
                &gt;&gt;&gt;&gt; <a moz-do-not-send="true"
                  href="http://www.tudorgirba.com" target="_blank">www.tudorgirba.com</a><br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; "Yesterday is a fact.<br>
                &gt;&gt;&gt;&gt; Tomorrow is a possibility.<br>
                &gt;&gt;&gt;&gt; Today is a challenge."<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; --<br>
                &gt;&gt;&gt; Mariano<br>
                &gt;&gt;&gt; <a moz-do-not-send="true"
                  href="http://marianopeck.wordpress.com"
                  target="_blank">http://marianopeck.wordpress.com</a><br>
                &gt;&gt;&gt;<br>
                &gt;&gt;<br>
                &gt;<br>
                &gt; --<br>
                &gt; <a moz-do-not-send="true"
                  href="http://www.tudorgirba.com" target="_blank">www.tudorgirba.com</a><br>
                &gt;<br>
                &gt; "Beauty is where we see it."<br>
                &gt;<br>
                &gt;<br>
                &gt;<br>
                &gt;<br>
                &gt;<br>
                &gt;<br>
                &gt;<br>
                &gt;<br>
                <br>
              </div>
            </div>
            <font color="#888888">--<br>
              <a moz-do-not-send="true" href="http://www.tudorgirba.com"
                target="_blank">www.tudorgirba.com</a><br>
              <br>
              "If you interrupt the barber while he is cutting your
              hair,<br>
              you will end up with a messy haircut."<br>
              <br>
              <br>
            </font></blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        Mariano<br>
        <a moz-do-not-send="true"
          href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
        <br>
      </blockquote>
    </blockquote>
  </body>
</html>