Re: Crashing Strongtalk with a simple sample
prunedtree <[email protected]> Tue, 22 May 2007 02:10:56 -0000
| Newsgroups | gmane.comp.lang.smalltalk.strongtalk |
|---|---|
| Message-ID | <[email protected]> |
Strongtalk reserves 50 mbyte of memory space (remember this VM is 10 years old). If you use more than what is reserved, you'll crash. You don't need such a complex piece of code to trigger it, a simple Array new: 20*1000*1000. is enough. How to fix ? add: ReservedHeapSize=1048576 to .strongtalkrc (the value is in kbytes. 1 GB here. default is 50*1024) then your code will work (will take several minutes, be patient). But because the oldspace GC isn't invoked automatically yet, if you reiterate any huge allocation a few times without explicit GC, you'll crash. After one iteration, heap grows to 384 MBytes here. The result is 113321011323208.37 btw regards, prunedtree On May 21, 8:13 pm, "[email protected]" <[email protected]> wrote: > Hello folks, > I am just running Strongtalk for a few minutes trying to do some basic > benchmarking. > Unfortunately, the following code will crash StrongTalk: > Is this so sophisticated ? > > dotest > > |x a sum2 count| > > x:=0. > count:=10000000. > a:=Array new:count. > 1 to:count do: [:i| x:=x+1.13321. a at:i put:x]. > sum2:=0.0. > a collect:[:y| sum2:=sum2+(y*2)]. > > ^sum2 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Strongtalk-general" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/strongtalk-general?hl=en -~----------~----~----~----~------~----~------~--~---