OK - I've increased both the initial and maximum heap sizes, but it 
hasn't made a lot of difference. Still getting memory issues. I'm 
starting to carve bits out of the game, which is a shame, as it may 
soon reach a point where we have to give up on it.

What's still not clear is whether the memory is getting used up only 
by displayed assets, or by all assets, even those not in use. If it's 
the former, I may as well pack it in now, as a board and 50 pieces 
should not crash a game every 10 minutes. If it's the latter, I can 
probably do something about this by making some choices, splitting 
the module into several and switching between them, cutting some 
assets etc. Any more views?

--- In [email protected], "benw_h" <[EMAIL PROTECTED]> wrote:
>
> Thanks. That's really helpful. Will give it a whorl now that I'm re-
> installed...
> 
> --- In [email protected], "countermancx" <jmalter@> 
> wrote:
> >
> > Hi Ben,
> > 
> > it's fairly easy to increase your heap sizes. In a WinOS, right-
> click 
> > on your VASSAL shortcut & examine its Properties. Its Target will 
> be 
> > something like:
> > 
> > C:\WINNT\system32\javaws.exe -offline "C:\Documents and 
> > Settings\<username>\Application Data\Sun\Java\Deployment\cache\6.0
\8
> > \67e73dc8-75cab2a9"
> > 
> > Then in Explorer, nav to and open that '67e73dc8-75cab2a9' file 
in 
> > your texteditor app. Don't open the 1KB file of the same name 
that 
> > has the '.idx' extension, open the extensionless 2KB file. This 
> > extensionless file (under Java 6) is the same as the Java 5 
*.jnlp 
> > file.
> > 
> > Find the argument that follows <resources>, it'll read something 
> like:
> > 
> > <j2se version="1.5+" max-heap-size="1024m"/>
> > 
> > 
> > and edit that argument to read:
> > 
> > <j2se version="1.5+" initial-heap-size="512m" max-heap-
> size="1024m"/>
> > 
> > Don't change the syntax or add any carraige-returns! Save the 
file 
> & 
> > close it, then start VASSAL.
> > 
> > 
> > I never got any gratification from increasing the max-heap, but 
> > adding the initial-heap really helps a lot. In WinOS, use Task 
> > Manager's Processes tab to monitor the mem usage of your 
javaw.exe 
> > while your mod is running, then you can fine-tune your initial-
heap 
> > size if needed.
> > 
> > Note that w/ each VASSAL upgrade, Java will overwrite this 
> > extensionless file, or mebbe it'll create a new one in another 
dir. 
> > Regardless, you'll have to follow the shortcut Target again & re-
do 
> > that heap-size edit. If you use a dedicated shortcut to open your 
> > particular modfile, you'll likely have to follow its Target to 
> > another file, where you'll have to make the same edits.
> > 
> > hth. 
> > 
> > --- In [email protected], "benw_h" <benw_h@> wrote:
> > >
> > > This is definitely a memory leak going on in the heap. I 
presume 
> > this 
> > > is caused by Vassal not Java itself, but from a bit of 
searching, 
> > it 
> > > seems to be not uncommon  in Java apps.
> > > 
> > > Still looking for suggestions on how to fix/counter it, and how 
> to 
> > go 
> > > about increasing memory allocation...
> > > 
> > > /me bangs head on desk...
> > > 
> > > --- In [email protected], "benw_h" <benw_h@> wrote:
> > > >
> > > > OK thanks - I can't actually work out how to increase the 
> memory 
> > > > allocation, and obviously cutting stuff is not very useful as 
> it 
> > > > effects the game. Are the limits relevant to what's on sreen 
or 
> > to 
> > > > everything in the module? I might be able to split the 
> extensions 
> > > > into another module and treat it as two seperate games. Not 
> very 
> > > > elegant, but I am a bit desperate!
> > > > 
> > > > --- In [email protected], "Brent Easton" 
<b.easton@> 
> > > > wrote:
> > > > >
> > > > > Ben,
> > > > > 
> > > > > >....and do any of the changes you make effect saved games 
> > > already 
> > > > in 
> > > > > >progress? So far I've reduced the colours of all the maps. 
> > > > > 
> > > > > Reducing the number of colors in the map can reduce your 
file 
> > > size 
> > > > in the module (as long as you reduce it to <= 256 colors, 
make 
> it 
> > > > indexed and save it as a PNG), but this will have no effect 
on 
> > the 
> > > > memory required by VASSAL to display those maps.
> > > > > 
> > > > > The number and size of maps, counters and cards is really 
the 
> > > only 
> > > > issue.
> > > > > 
> > > > > 
> > > > > 
> > > > > > All of my 
> > > > > >pieces are already only 1kb (does it matter how many 
colours 
> > > they 
> > > > are 
> > > > > >if they are already this small?). I'm still getting out of 
> > > memory 
> > > > > >errors. Does the sheer number of images in the module 
(even 
> if 
> > > not 
> > > > > >displayed) effect this? The mod is about 25Mb (5+5 per 
> > > extension), 
> > > > with 
> > > > > >probably around 5-600 piece images, 8 maps (with multiple 
> > boards 
> > > > in 
> > > > > >most cases), and another 200 cards. Any advice? AT present 
> > I've 
> > > > truned 
> > > > > >my attention to increasing the memory allocation...
> > > > > 
> > > > > ____________________________________________________________
> > > > > Brent Easton                       
> > > > > Analyst/Programmer                               
> > > > > University of Western 
> Sydney                                   
> > > > > Email: b.easton@
> > > > >
> > > >
> > >
> >
>


Reply via email to