tag:blogger.com,1999:blog-8712770457197348465.post6169346898382259159..comments2024-03-28T02:47:19.159-07:00Comments on Javarevisited: 10 points about Java Heap Space or Java Heap Memoryjavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger68125tag:blogger.com,1999:blog-8712770457197348465.post-28482452120485330832022-05-18T21:49:32.782-07:002022-05-18T21:49:32.782-07:00My pleasure, glad you find it useful. My pleasure, glad you find it useful. javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-28382615903587512932022-05-18T13:51:47.655-07:002022-05-18T13:51:47.655-07:00Thank you for explaining this! Thank you for explaining this! Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-52184255131588298492020-02-06T03:39:07.904-08:002020-02-06T03:39:07.904-08:00you can declare the array size when you are creati...you can declare the array size when you are creating the array, it seems you don't know the exact number of element before hand. In that, just use ArrayList instead of Array and initialize ArrayList with 25000. javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-63752745849267799292020-02-05T12:38:48.088-08:002020-02-05T12:38:48.088-08:00I have an issue with an applet build. Can anyone t...I have an issue with an applet build. Can anyone tell me how to specify more space to get around this error:<br />---------------------<br />When building a smart card applet I get:<br /><br />Error: class java.lang.ArrayIndexOutOfBoundsException, Array index out of range: 25305<br />java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 25305<br />at com.ibm.jc.apps.tric.c.g$d.a(Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-42674953991853005172019-03-03T09:08:32.519-08:002019-03-03T09:08:32.519-08:00Fantastic info used for my long time doubts about ...Fantastic info used for my long time doubts about JVM Anonymoushttps://www.blogger.com/profile/02088365438546547120noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-70766626814212921622017-05-11T22:57:30.790-07:002017-05-11T22:57:30.790-07:00Great post Great post sandeephttps://www.blogger.com/profile/11952140559466579109noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-6962976350329325032016-06-05T18:13:56.961-07:002016-06-05T18:13:56.961-07:00@Javin... truly you are a good blogger. Whenever I...@Javin... truly you are a good blogger. Whenever I read your article I always learn something new. Thanks for this wonderful work.<br />Keep serving java community.. 😃Anonymoushttps://www.blogger.com/profile/05163394149088187825noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-73819571973086859972016-05-09T06:50:52.426-07:002016-05-09T06:50:52.426-07:00What is the difference between Java heapspace and ...What is the difference between Java heapspace and tomcat heap space?Anonymoushttps://www.blogger.com/profile/07401599205057457091noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-24360805513425937542016-02-25T12:11:04.599-08:002016-02-25T12:11:04.599-08:00Hi, Very nice article.
I have used Xms= 4G and Xm...Hi, Very nice article.<br /><br />I have used Xms= 4G and Xmx=8G in my Java application. I was expecting that on start application it will consume atleast of 4GB (as Xms is set to 4GB) from OS. But it is not the case it used only about a GB and then gradually increase over days to 4 and then continue till 8GB. I am running this application on windows 2008 R2. <br /><br />Any Idea why JVM does notPeerhttps://www.blogger.com/profile/15602491137884999919noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-61237469543377063482016-02-08T03:28:15.242-08:002016-02-08T03:28:15.242-08:00@Unknown, never heard about servlet memory, can yo...@Unknown, never heard about servlet memory, can you please clarify where did you heard that, what is the context behind it?javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-89088905345823682092016-02-08T00:58:01.877-08:002016-02-08T00:58:01.877-08:00Please let me know difference between servlet memo...Please let me know difference between servlet memory and heap memoryAnonymoushttps://www.blogger.com/profile/14976307715153491261noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-60056273220863353742014-03-11T01:29:28.708-07:002014-03-11T01:29:28.708-07:00Hi, I have cross-compiled the IcedTea JDK for Linu...Hi, I have cross-compiled the IcedTea JDK for Linux device. Is there any way that I can freeze the max java heap size for all java apps? I mean user can't change the heap size, every java app will have the same max heap space?Rahulnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-85718702227542369872014-02-27T21:26:39.872-08:002014-02-27T21:26:39.872-08:00I got these kind of errors .. what is this whether...I got these kind of errors .. what is this whether heap size is full or permsize is unable to load.<br /><br />org.apache.catalina.core.StandardWrapperValve invoke<br />SEVERE: Servlet.service() for servlet SafeTestServlet threw exception<br />java.lang.OutOfMemoryError: GC overhead limit exceeded<br />java.lang.OutOfMemoryError: GC overhead limit exceeded<br />Exception in thread "Timer-0&Dineshhttps://www.blogger.com/profile/12346822529382508980noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-13285424057575917922013-10-21T22:53:53.268-07:002013-10-21T22:53:53.268-07:00one mistake is, heap doesnot need to start from bo...one mistake is, heap doesnot need to start from bottom of address space (actually is virtual memory). <br />another one is, not all garbage collections need to be generational garbage collection, such as mark-sweep garbage collection, it really differs from each other in real application. <br />one more not all objects need to be in heap, as someone already points out.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-25273642721276639812013-09-25T12:14:51.535-07:002013-09-25T12:14:51.535-07:00The point "2. Whenever we create objects they...The point "2. Whenever we create objects they are created inside Heap in Java." it's not actually always true. The JVM has a feature called escape analysis which in some circumstances allocate the object on stack rather than heap.Arkadiusz Głowackihttps://www.blogger.com/profile/15711077516639954555noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-89555329515517745582013-08-07T21:25:23.979-07:002013-08-07T21:25:23.979-07:00@Akshay, Welcome to Javarevisited, and thanks for ...@Akshay, Welcome to Javarevisited, and thanks for kind words.Javin @ 32-bit vs 64-bit JVMhttp://javarevisited.blogspot.com/2012/01/find-jvm-is-32-or-64-bit-java-program.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-44958243213597785802013-08-06T11:54:41.747-07:002013-08-06T11:54:41.747-07:00Javin, you are doing wonderful job dude. I feel lu...Javin, you are doing wonderful job dude. I feel lucky to go through your pages. They are so friendly, so straight forward, so interactive with very good narration and you make it really simple to learn. Identification of topics is so well done that i feel every blog page is a must read page. Thanks and wish you have huge fan base. Thanks again.Akshaynoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-58643353725413941502013-07-03T09:48:16.661-07:002013-07-03T09:48:16.661-07:00This author adequately demonstrates how JAVA and ....This author adequately demonstrates how JAVA and .NET programmers know not how computers work. They are not even properly educated on memory management, I/O, or data management. When I learned C you had to manage your STACK and HEAP. You had to KNOW what these mean and how they affected your program. Now I meet "professional" programmers who have NO CLUE how computers, networks, or dataAnonymoushttps://www.blogger.com/profile/12531425991563175129noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-32401952206686934252013-05-07T22:49:03.327-07:002013-05-07T22:49:03.327-07:00This page is a must read for all budding java deve...This page is a must read for all budding java developers to build some basics.Anonymoushttps://www.blogger.com/profile/17920507785789027799noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-46383804205135331212013-03-18T05:50:04.737-07:002013-03-18T05:50:04.737-07:00@Mihir, max memory depends upon lot of factor, tho...@Mihir, max memory depends upon lot of factor, though theoretical limit for 32 bit JVM is 4GB, you can only allocate around 1.5GB in Windows, more than that, will result in <a href="http://javarevisited.blogspot.sg/2012/12/invalid-initial-and-maximum-heap-size.html" rel="nofollow">Invalid Maximum Heap Size</a> during JVM startup. On 64 bit machine, I guess 2GB would be find.Javin @ Singleton vs Static classhttp://javarevisited.blogspot.com/2013/03/difference-between-singleton-pattern-vs-static-class-java.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-53814071781294094972013-03-17T23:27:37.075-07:002013-03-17T23:27:37.075-07:00Hello Javin,
i found your article very useful. i a...Hello Javin,<br />i found your article very useful. i am in very specific problem. i need to load in my java program an image file having size of 18000 * 18000 in pixels so for that i have to use BufferedImage (which creates whole file in a memory at a time) so for that i need (18000 * 18000 * 4 )/ (1024*1024) = 1030 MB of memory approximately , so probably it throws and OutofMemoryException Anonymoushttps://www.blogger.com/profile/12686741009056738062noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-2034585934630109352013-02-26T05:05:22.950-08:002013-02-26T05:05:22.950-08:00@Anonymous, I agree, Java heap memory is for every...@Anonymous, I agree, Java heap memory is for every one :)Javin @ Java Classloder Workinghttp://javarevisited.blogspot.com/2012/12/how-classloader-works-in-java.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-85741288857114968912013-02-26T05:01:49.854-08:002013-02-26T05:01:49.854-08:00I am speaking out of topic, but have to say it...w...I am speaking out of topic, but have to say it...why did you use the phrase "...tutorial is for my beginner brothers". Without being gender biased, you should have used "beginner friends" :)<br />Having said that, your blogs are really nice and explainatory. They are very helpful in understanding the concepts that we just know theoritically.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-71588896900492923002012-10-16T01:10:34.797-07:002012-10-16T01:10:34.797-07:00I am getting following error while running my Java...I am getting following error while running my Java program from command line "could not create the java virtual machine Invalid maximum heap size: -Xmx". The command is java -Xmx 1800M Hello , I have more than 4G of RAM and trying to run this command in Windows XP Machine. Why its saying invalid maximum heap size if I have more tha 4G of memory and creating Java application with 1.8G Monicanoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-71542704906078294222012-08-05T04:31:39.046-07:002012-08-05T04:31:39.046-07:00Thanks for the info on Heap segment...Very usefull...Thanks for the info on Heap segment...Very usefull for java beginners like me ...Anonymousnoreply@blogger.com