****** Dear Dmitri, thank you for the advice concerning GC. But I did not get an improvement by tuning the parameters; the essential behavior remains the same.
****** Dear Frank, Tree branches can be cut off by de-referencing nodes, this is not the problem. ****** Dear Brian, probably you got the real reason for my problem: YES, I am heavily using inner classes which also have many further inherited classes.... The idea was to write a parser for XML formatted data of whole chromosome annotations. I did not get so happy with DOM or SAX parsers since both run into "OutOfMemory" when using them here. Also this was an unexplained feature, but I decided to implement this inner class structure instead as a workaround. Unfortunately, this induced my present memory problems: When being deep inside inner classes, TEMPORARY objects are NOT GC'd. (Tree branches can be cut off, this is not the problem.) For me this is a bug in JAVA since I do not get the point why this must be. Probably I will have to unravel this structure into independent classes, but this is a hard way and not as performant as before. Does anyone know a way how to enforce TEMPORARY objects of inner classes to be GC'd ???? This might also be the reason why DOM and SAX parsers make problems as well on VERY BIG XML documents. Thanx a lot, Sven [EMAIL PROTECTED] schrieb am 27.12.04 19:04:08: > > Hi Sven, > > Where did you read that Java won't GC an object until the calling method > completes? I ran a quick test -- a routine that just created objects -- and > they still got gc'd. > > It could be that the objects you are creating are being pinned by some > reference, and that's why they aren't getting GC'd. I got surprised by this > once when using an inner class. > > Best way to track that down is to profile it with something like OptimizeIt > or JProbe and take a look at the references. > > Brian > <[EMAIL PROTECTED]> schrieb am 27.12.04 20:15:30: > > Wow, I doubt that you would have pretty much less trouble in any other > language if you try to cram a chunk of 1000Mbyte+ into RAM. Did you run a > profiler to detect that your problem is actually a problem of the > garbage-collection?! I think I don't get the "business-case" behind that > yet: If you have a complex structured hierarchical object, how does it come > that there are objects that are unreferenced and can be garbage-collected? > Do you have a tree and you manually cut of the branches by de-referencing > nodes?! Unless you do so, I don't yet see, how and where garbage-collection > can actually take place in this hierarchy, as long as there is still a leaf > that holds a reference. Maybe you can provide some background on what you're > trying to achieve... > > Cheers > stf > > -----Original Message----- > From: Discussion list for Java 2D API > [mailto:[EMAIL PROTECTED] Behalf Of Sven Mielordt > Sent: Monday, December 27, 2004 12:05 PM > To: [EMAIL PROTECTED] > Subject: [JAVA2D] Memory Problems with the garbage collection > > > Dear fellows, > > we are working with highly complex structured hierarchical objects in > bioinformatics > and do allocate a hugh amount of memory (>1000 MByte). > > As soon as the depth of the object tree becomes too high, JAVA is no more > able > to remove unreachable temporary objects, leading to more and more uncleared > memory and at last to "OutOfMemory". > > The problem might arise from used big loops out of one routine, since I read > some weeks ago that the garbage collection can only remove temporary objects > when the calling master method is terminated. (I think these references are > called "weak", "phantom" or whatever). > > Does anyone know, how I can enforce memory to be freed whenever a reference > becomes unreachable, meaning that these temporary objects become reachable > for the garbage collection even if the calling method has not terminated? > > It would help us a lot to find a workaround, because this property seems to > be > a severe limitation in nerdy bioscience applications! This request does not > really > match the JAVA2D homepage, although we also do a lot of graphical animation. > But the error certainly is not from JAVA2D, so perhaps somebody also knows a > more appropriate mailing list or resorce to discuss my problem? > > Thank you all, > Sven ________________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193 =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
