AH HA! This is precisely the trap that a lot of folks run in to with respect to the 
GC. That the memory remains high in an idle system for an indefinite period indicates 
that you indeed have reachable objects loitering around in the heap. Unfortunately 
forcing a GC will not release them. In fact, the existence of incremental GC pretty 
much eliminates any benefit for an application (short of a diagnostic tool) from 
executing an explicit GC. 
 
I suggest using weak references such as found in the weak hashmap. The cost is that 
you now have to reload objects on demand if they were collected and the reference set 
to null. Another approach is the memory mapped  files (FileChannel) and now that we 
are JDK 1.4 all around I am considering moving towards that. Your data looks like a 
sequential in-memory stream but in fact it is being paged in and out using a fixed 
memory window. 

        -----Original Message----- 
        From: Muraly R [mailto:[EMAIL PROTECTED] 
        Sent: Tue 1/27/2004 9:23 PM 
        To: [EMAIL PROTECTED] 
        Cc: 
        Subject: RE: [JBoss-user] Garbage Collector: Service?
        
        
        Hi Rod,
                The application is heavily using heavy weights(like vectors and 
hashmaps).
                Though they are declared within corresponding methods only, after a 
particular operation, the memory shoots up and stays in that state forever. It never 
return to 'normal' state.
                Hence thought of implementing a periodic GC.
                I am aware of the 'best effort try' of the VM by calling the GC. I am 
trying various options to bring the memory to an 'affordable' state.
                Hope I have cleared the requirement.
                Thanks all for your replies and expecting MORE:-)
        Cheers
        Muraly
        
        At 12:54 27/01/2004 -0800, you wrote:
        

                Just curious, what is your objective in terms of a periodic GC call? 

                        
                        -----Original Message----- 
                        From: Muraly R [mailto:[EMAIL PROTECTED] 
                        Sent: Monday, January 26, 2004 8:34 PM 
                        To: [EMAIL PROTECTED] 
                        Subject: RE: [JBoss-user] Garbage Collector: Service?
                        
                        
                        Hi Heiko, 
                                Thanks for reply. 
                                Please bear my ignorance. Could you give a more 
detailed explanation? 
                                Did you mean writing a seperate class and deploy it as 
a '-service.xml' file. If then, how can I schedule this class to be run, say every 5 
mins? 
                                 
                        Thanks 
                        Muraly
                        
                        
                        At 09:13 23/01/2004 +0100, you wrote: 

                                Hi,
                                
                                
                                >       Is there any particular service available in 
JBoss to 
                                > schedule the garbage collector?
                                
                                
                                use jboss.system:type=System and there the 
                                runGarbageCollector call.
                                
                                
                                 Heiko
                                
                                
                                
                                
                                
------------------------------------------------------- 
                                The SF.Net email is sponsored by EclipseCon 2004 
                                Premiere Conference on Open Tools Development and 
Integration 
                                See the breadth of Eclipse activity. February 3-5 in 
Anaheim, CA. 
                                http://www.eclipsecon.org/osdn 
                                _______________________________________________ 
                                JBoss-user mailing list 
                                [EMAIL PROTECTED] 
                                
https://lists.sourceforge.net/lists/listinfo/jboss-user 

<<winmail.dat>>

Reply via email to