Re: Problem with StringBuffer

2000-03-29 Thread Archie Cobbs
Tatu Saloranta writes: > The same problem occurs in Sun's JDK as well, although by printing > StringBuffer.capacity() regularly, I noticed that the behaviour is > not 100% identical. In both cases, though, I end up getting an > OutOfMemory exception... :-) Here's a related Sun bug: http://deve

Re: Problem with StringBuffer

2000-03-29 Thread Patrick Tullmann
> I think the actual problem is not in the StringBuffer size, but in the > copy done when the buffer is un-shared; after all, unless the StringBuffer > jump down from 1Mb to 1 byte, a single instance would not be a big problem; > but having many tokens with a lot of wasted memory would be ... I

Re: Problem with StringBuffer

2000-03-29 Thread Maurizio DE CECCO
Tatu Saloranta <[EMAIL PROTECTED]> writes: > I have a lexer (made with JFLex), that uses StringBuffer for > constructing the strings for certain tokens. [ ... ] I had the same problem some times ago, with an old version of the Jacl interpreter on the Sun JDK 1.1.something; in that case it w