Re: java.lang.StackOverflowError




<xareon@xxxxxxxxx> wrote in message
news:1169681375.515103.215970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
yes man, u're right. i'm writing an universal parser for type 1
grammar, and i'll follow your hint and try to post in comp.compilers.
however, tell me: could i avoid the stackoverflow by resizing the
stack? i read somewhere that i could fix my problem by setting a bigger
stack, that eclipse should set really small by default value as some
people say. it's something about commands -Xms -Xmx -Xss, but i
couldn't manage to make them work (i just run the program via console
and get the same error). do you know something about?


Right, you could play around with the -Xms etc. settings (you can google
for the details), but as Andrew said, if you're running into errors after
just 12 characters, then you're memory usage is probably exponential
compared to the length of the input. Perhaps the problem you are trying to
solve is inherently exponential, I don't know the theory well enough to say
for sure. If it is exponential, then you're essentially out of luck and this
is an unsolvable problem. If you're lucky, the people at comp.compilers will
tell you it's not exponential, and give you an algorithm for solving it in
quadratic memory.

- Oliver


.



Relevant Pages

  • Re: java.lang.StackOverflowError
    ... could i avoid the stackoverflow by resizing the ... stack, that eclipse should set really small by default value as some ... for the details), but as Andrew said, if you're running into errors after just 12 characters, then you're memory usage is probably exponential compared to the length of the input. ... With any recursive algorithm, it is worth asking "What ensures that the ...
    (comp.lang.java.programmer)
  • Re: Undebuggable StackOverflowException, possibly related to hotfixes from windowsupdate
    ... There is a difference whether the stack overflow happends in the JITed code ... void f ... > would have bombed from the StackOverflow. ...
    (microsoft.public.dotnet.framework.clr)
  • Re: Problem with mlockall() and Threads: memory usage
    ... We do want improved latency, but with reasonable memory usage. ... With 20 threads runing the system will lock 160MBytes of memory just for stack ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: StackOverflowError bei grossem Datenmodell
    ... > Ein StackOverflow deutet für mich auf eine extrem tiefe Rekursion hin. ... > Die erzeugten Objekte landen ja auf dem Heap und nicht auf dem Stack. ... eine tiefe Rekursion ist drin, ... Sollte der Text nicht in den Objekten gespeichert werden, also im Heap? ...
    (de.comp.lang.java)
  • Re: How to get process info from python
    ... '''Return process memory usage in bytes. ... '''Return process stack size in bytes. ... >> I've had to work with process data in the past, and you're right, a ... >> the module's functionality. ...
    (comp.lang.python)