Well, since it's a wab appliation, it starts with Tomcat server, not java but anyway, MaxPermSize doesn't seem to exist I tried adding <jvm-option> in server.xml but it either didn't work or didn't recognize the property.
-------------------------------------- Well, heap size and each division has its default value. In fact, they are specified proper values, such as minimal size, maximal size, ratio, etc., according to requirement. Did you try customizing memory model of Hotspot at application startup? I suppose your problem can be solved by increase the maximal size of perm division at startup. You can start up <app> as follows, but I am not sure: java -XX:MaxPermSize=10m <app> 2005/11/28, Eric Plante <[EMAIL PROTECTED]>: > It uses hotspot. > > I don't append litteral strings but I append substrings of a String object > in my StringBuilders. > > By HD memory I meant physical. > > If I understand well, there is no solution to my problem, I will always be > limited to the heap size? That really troublesome, it should use the > physical memory when the heap overload. > > Thanks > > 2005/11/28, Eric Plante <[EMAIL PROTECTED]>: > > Thanks > > > > 1-How do I know if I use hotspot or not? > $ java -version > > > 2-Is StringBuilder using the same heap as String? > > "xxx" is regard as permniant object. does your StringBuilder leverages > sb.append("xxx")? > If so, I suppose it is the same to String s="xxx";sb.append(s); > > 3-What if I can't control the size of the Strings since they come from > files > > that can be as big as the HD memory? > String loaded seems not to be deal with in the same way as String s = "xxx" > > > 4-Is there a way to use the Hard Drive memory instead of the stack? > I have no idea what is Hard Drive memory, sorry. > and stack differs from heap, both differ from physical memory. > > > > > -------------------------------------------------- > > > > Well, I suppose I can offer some tip that may help. > > > > Let me suppose you use Hotspot VM. > > > > Sun's Hotspot VM 's heap space consists of three divisions for young > > generation, old generation and perminant generation. Young generation > > refers to objects that are created and usually it died in a short > > time. The corresponding division leverages copying to collect garbage. > > When some object survives after several gc, It is moved to old > > generation division, where mark-and-sweep is leveraged. And the > > perminant gereration is where class objects reside, its default size > > is 4M(I am not certain). > > > > Well, in case of String s = "xxxx"; "xxxx" is put into division of > > perminant generation. Your String is huge enough to exceed the size > > limit and of course throws OutOfMemory error. You can increase only > > the size of division of perminant generation to solve the problem by > > specifying some -X option. I am sorry to say that I lose my notebook > > the day before yesterday, so I cannot give any further tip. > > > > Regards, > > > > Jerry > > > > 2005/11/28, Eric Plante <[EMAIL PROTECTED]>: > > > Hi, > > > > > > I have a struts application(1.1) using Eclipse and Exadel Studio with > > tomcat > > > 5.5.9 using Jave 5.0 > > > > > > I have to deal with a huge String in memory, about 5-6M and every time I > > run > > > my web application, I get java.OutOfMemoryError: java heap > space...always > > at > > > the same place(I fill a StringBuilder with the main String + other > strings > > > so I am effectively dealing with 2 huge strings at that point). > > > > > > When I run my application with a smaller string, it works fine so I > > checked > > > for potential memory leak or bust but it seems to run just the minimum > > > strings and stringbuilder object the application requires and all the > > > objects should be destroyed properly. > > > > > > I checked the web and all I could find was to try raising the heap space > > > exept that java -server -Xmx512m doesn't see any server and it doesn't > > seem > > > to be a good idea to raise the heap stack anyway but I saw a post saying > > > that Java 5.0 was using a proper heap size(1G although I don't have 1G > > RAM, > > > I suppose it uses what it can.) > > > > > > I always thought that if there wasn't enough space in memory, > applications > > > would use the HD as memory slowing down the application but at least it > > > wouldn't explode. > > > > > > Any idea how my problem could be solved? Are there any memory obscure > > > restrictions to String and StringBuilder I should know that books > doesn't > > > say? I just can't see how 2 5M String in memory could be that much of a > > > problem in 2005. > > > > > > Thanks > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]