<!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>
- 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> </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" <<a moz-do-not-send="true"
href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>>
a é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"><<a moz-do-not-send="true"
href="mailto:tudor.girba@gmail.com">tudor.girba@gmail.com</a>></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>
</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>
> Hi Tudor,<br>
><br>
> There is a constant in sqWin32Alloc.h
(platforms\win32\vm) :<br>
> #define MAX_VIRTUAL_MEMORY 512*1024*1024<br>
> you can change it to whatever you want and rebuild
the vm,<br>
> for exzmple give all the available memory less 256
M .<br>
><br>
> HTH<br>
><br>
> Regards<br>
> Alain<br>
><br>
> "Tudor Girba" <<a moz-do-not-send="true"
href="mailto:tudor.girba@gmail.com">tudor.girba@gmail.com</a>>
a écrit<br>
> 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>
> Hi,<br>
><br>
> We have no specific startUp: methods in Moose. In
any case, the issue with<br>
> opening the image does not seem to be related to
startUp:.<br>
><br>
> Is it really true that the Cog VM is limited to
512MB of memory?<br>
><br>
> Cheers,<br>
> Doru<br>
><br>
><br>
> On 21 Apr 2011, at 14:27, Luc Fabresse wrote:<br>
><br>
>> Hi Doru,<br>
>><br>
>> 2011/4/21 Tudor Girba<br>
>> <<a moz-do-not-send="true"
href="mailto:tudor.girba@gmail.com">tudor.girba@gmail.com</a>><br>
>> Hi,<br>
>><br>
>><br>
>><br>
>> On Apr 21, 2011, at 14:06, Mariano Martinez
Peck<br>
>> <<a moz-do-not-send="true"
href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>>
wrote:<br>
>><br>
>>><br>
>>><br>
>>> On Thu, Apr 21, 2011 at 1:58 PM, Tudor
Girba<br>
>>> <<a moz-do-not-send="true"
href="mailto:tudor.girba@gmail.com">tudor.girba@gmail.com</a>>
wrote:<br>
>>>> Hi again,<br>
>>>><br>
>>>> I did not say what the problem was :).
The problem was that when<br>
>>>> opening the image on Windows, he got a
Space is low message and the<br>
>>>> image was not usable (see attachment).<br>
>>><br>
>>> That's weird. Does moose have something on
the startup list? something<br>
>>> that can be bothering there?<br>
>><br>
>> Not that I know of. Is there a way to check
this?<br>
>><br>
>> Classes should be registered using Smalltlak
addToStartUpList: aClass<br>
>> Then aClass class>>#startUp: is executed
at startup.<br>
>> So implementors of #startUp: on Moose classes
should give you the answer.<br>
>><br>
>> #Luc<br>
>><br>
>><br>
>> Actually, using exactly the same process some
days ago he produced an<br>
>> image of 190MB. This one works just fine on
Windows. The only difference<br>
>> between the two is the size of the loaded data.<br>
>><br>
>> It would be really bad news if the Windows vm
would be so severely limited<br>
>> in terms of memory.<br>
>><br>
>> Cheers,<br>
>> Doru<br>
>><br>
>><br>
>>><br>
>>> On Mac it worked just fine.<br>
>>>><br>
>>>> Cheers,<br>
>>>> Doru<br>
>>>><br>
>>>><br>
>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>> On 21 Apr 2011, at 12:52, Tudor Girba
wrote:<br>
>>>><br>
>>>>> Hi,<br>
>>>>><br>
>>>>> I received a question from someone
running a 200MB image on Windows<br>
>>>>> using Cog 2361.<br>
>>>>><br>
>>>>> If I open the image on Mac, it
works just fine. Unfortunately, I do<br>
>>>>> not have a Windows machine around,
and I cannot test but I believe it<br>
>>>>> should be solvable by increasing
the allocated memory.<br>
>>>>><br>
>>>>> On Mac, I would run it with:
./Croquet -memory 1500m<br>
>>>>><br>
>>>>> Can anyone help me with the right
incantation for Windows?<br>
>>>>><br>
>>>>> Cheers,<br>
>>>>> Doru<br>
>>>>><br>
>>>>><br>
>>>>> --<br>
>>>>> <a moz-do-not-send="true"
href="http://www.tudorgirba.com" target="_blank">www.tudorgirba.com</a><br>
>>>>><br>
>>>>> "What we can governs what we wish."<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> <Space is low.png><br>
>>>><br>
>>>> --<br>
>>>> <a moz-do-not-send="true"
href="http://www.tudorgirba.com" target="_blank">www.tudorgirba.com</a><br>
>>>><br>
>>>> "Yesterday is a fact.<br>
>>>> Tomorrow is a possibility.<br>
>>>> Today is a challenge."<br>
>>>><br>
>>>><br>
>>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Mariano<br>
>>> <a moz-do-not-send="true"
href="http://marianopeck.wordpress.com"
target="_blank">http://marianopeck.wordpress.com</a><br>
>>><br>
>><br>
><br>
> --<br>
> <a moz-do-not-send="true"
href="http://www.tudorgirba.com" target="_blank">www.tudorgirba.com</a><br>
><br>
> "Beauty is where we see it."<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><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>