Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #2710 > unrolled thread
| Started by | "kkrish" <kkrish@THRWHITE.remove-dii-this> |
|---|---|
| First post | 2011-04-27 15:40 +0000 |
| Last post | 2011-04-27 15:40 +0000 |
| Articles | 4 — 4 participants |
Back to article view | Back to comp.lang.java.gui
finding memory required f "kkrish" <kkrish@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
Re: finding memory requir "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
Re: finding memory requir "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
Re: finding memory requir "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
| From | "kkrish" <kkrish@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:40 +0000 |
| Subject | finding memory required f |
| Message-ID | <1194003693.320460.90780@q5g2000prf.googlegroups.com> |
To: comp.lang.java.gui
Hi all,
I have an application in Java Swing that has around 40
Jpanels with equal number of images on them and each panel will have
some other components also. I want ton find the amount of RAM the
application requires to run and also the memory requirement of each
JPanel and its components. How to find the memory requirement?
How can I make sure that the application will never run out of memory
(out of memory exception )?
Thanks in advance.
Krishna.
---
* Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [next] | [standalone]
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:40 +0000 |
| Subject | Re: finding memory requir |
| Message-ID | <7a9c7562b7810@uwe> |
| In reply to | #2710 |
To: comp.lang.java.gui kkrish wrote: .. > I have an application in Java Swing that has around 40 >Jpanels Did you mean javax.swing.JPanel?** I am unfamiliar with any 'Jpanel' or 'Jpanels'. > ..with equal number of images ... All specified by the program, or the user?* >..on them and each panel will have >some other components also. Limit the memory, until it runs out, for a rough idea. Also, jconsole that comes with the SDK, offers a basic view into the memory used by an app. >..I want ton find the amount of RAM the >application requires to run and also the memory requirement of each >JPanel and its components. How to find the memory requirement? * How long is a piece of string? A lot of this depends on the size of the images. >How can I make sure that the application will never run out of memory >(out of memory exception )? What is an 'out of memory exception'? I've struck 'OutOfMemoryError's** in applications before, but I have never seen one of those. ** This is programming, so please be very specific and accurate. -- Andrew Thompson http://www.athompson.info/andrew/ Message posted via JavaKB.com http://www.javakb.com/Uwe/Forums.aspx/java-gui/200711/1 --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [next] | [standalone]
| From | "Lew" <lew@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:40 +0000 |
| Subject | Re: finding memory requir |
| Message-ID | <vvydnVSfwN-JtrbanZ2dnUVZ_tajnZ2d@comcast.com> |
| In reply to | #2712 |
To: comp.lang.java.gui Andrew Thompson wrote: > kkrish wrote: > .. >> I have an application in Java Swing that has around 40 >> Jpanels > > Did you mean javax.swing.JPanel?** > > I am unfamiliar with any 'Jpanel' or 'Jpanels'. > Limit the memory, until it runs out, for a rough idea. > Also, jconsole that comes with the SDK, offers a > basic view into the memory used by an app. >> ..I want ton find the amount of RAM the >> application requires to run and also the memory requirement of each >> JPanel and its components. How to find the memory requirement? > > * How long is a piece of string? > A lot of this depends on the size of the images. Memory requirements for objects can vary widely, depending on what the optimizer does. In certain cases objects can be inlined and optimized out of existence altogether. >> How can I make sure that the application will never run out of memory >> (out of memory exception )? The best way is to follow good memory-allocation practices. Limit the scope of variables and the lifetime of objects to just what's needed. Let variables go out of scope, and objects to which they refer become eligible for garbage collection (GC). Unless, of course, something else such as a Collection still holds that reference. > What is an 'out of memory exception'? I've struck > 'OutOfMemoryError's** in applications before, but I > have never seen one of those. > > ** This is programming, so please be very specific > and accurate. -- Lew --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [next] | [standalone]
| From | "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:40 +0000 |
| Subject | Re: finding memory requir |
| Message-ID | <rpmpi35b076pe5kmn7pbg96r2bl3m2cvf3@4ax.com> |
| In reply to | #2710 |
To: comp.lang.java.gui On Fri, 02 Nov 2007 04:41:33 -0700, kkrish <clearminded.kkrish@gmail.com> wrote, quoted or indirectly quoted someone who said : > I have an application in Java Swing that has around 40 >Jpanels with equal number of images on them and each panel will have >some other components also. I want ton find the amount of RAM the >application requires to run and also the memory requirement of each >JPanel and its components. How to find the memory requirement? >How can I make sure that the application will never run out of memory >(out of memory exception )? If you give a Java app more RAM it will exploit it to avoid doing GC frequently. The tighter you make the RAM, the more frequent GC becomes. This will usually drive you nuts before you actually run out of RAM. I suggest you determine this with a binary search playing with the Java.exe command line options to find the minimal psychological torment point. See http://mindprod.com/jgloss/javaexe.html -- Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.gui
csiph-web