0

I've been trying to compile the NeHe tutorial for scala (link) and scalac (2.9.0, linux) uses up all my ram and then some. I basically can't compile it.

Why does it use so much ram?

Is there a workaround?

Cheers, Lucas

Lucas
  • 1,869
  • 4
  • 20
  • 36
  • That's curious. About how much RAM does it eat? Might be worth a shot trying soon to be released Scala 2.9.1. http://www.scala-lang.org/node/10743 I haven't had trouble compiling JOGL programs with the default memory allocation. – Kipton Barros Aug 30 '11 at 23:57
  • As Kipton suggests, numbers and other details will help here. How much memory is on your system? Are you specifying an `-Xmx` param or leaving this at the default? Are you getting an `OutOfMemoryException`, a `StackOverFlowException`, or running out of PermGen space? – Kevin Wright Aug 31 '11 at 08:15
  • I'm running it on my netbook, which has about 500m free plus swap. It just ends up filling my swap space to the point where my system stops responding - I guess it might start again - but it takes more than 15mins if it does. So in practice, it doesn't compile, though it might in theory. Maybe the answer is to use a better computer, but it just seemed like a lot of memory to use up. – Lucas Aug 31 '11 at 23:56
  • Think its a problem involving the combination of scalac and my laptop. Not quite sure what the problem is still. – Lucas Sep 01 '11 at 00:07

1 Answers1

2

You may want to increase the amount of memory available by setting JAVA_OPTS to -Xmx1024m

James Black
  • 41,583
  • 10
  • 86
  • 166