Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 8 years ago. Improve this question As per this answer here both java objects and primitives go on heap. So from the point of view of JVM,
Tag: heap-memory
About VM arguments
Am I right in thinking that when one specifies VM arguments in an IDE (I’m using NetBeans in this instance), that these arguments are only passed when the code is run through the IDE itself? Essentially, I’d like to specify that when my program runs, the VM’s minimum/initial heap size is 2Gb. I can do this using the -Xms2048m command,
System stack allocation in recursion
As we all know that all most all recursive functions can be modified to iterative approach. Suppose we take an example of adding two linklists which represent two huge numbers. This question can be solved either by recursion (which uses system stack) or iterative (explicit stack usage) approach. My doubt here is if i have given jvm heap size as
EXE4j Jar to exe error
I’m recently Java 7 update 21 JDK and i created java application with netbeans For distributing my jar i use Exe4j 4.5.2 Jar to exe. Now when i used Exe4j it creates exe but when i execute it it shows me error message. “The JVM could not be started. The maximum heap size (-Xmx) might be too large or an
Does Java’s new keyword necessarily denote heap allocation?
I’m trying to write something fast, and that constantly allocates and deallocates memory, making where this memory is allocated important in terms of performance. Does allocating objects always allocate them to the heap? Does JIT compilation do fancy allocation optimization of any sort? Answer Objects allocated with new are placed on the heap, but the JIT/JVM might optimize them to
PageOutputStream causing java.lang.OutOfMemory
We have a struts2 web application running in Tomcat 7 that is intermittently experiencing the same problem: Application operating perfectly normally After a variable amount of time (anywhere from 10 minutes to 7 days) the application slows down to a halt Multiple java.lang.OutOfMemory errors in catalina.out Linux free -m shows all physical and swap memory is used up (even though
Can the OS stop a Java process from garbage collecting?
I’m monitoring a production system with AppDynamics and we just had the system slow to a crawl and almost freeze up. Just prior to this event, AppDynamics is showing all GC activity (minor and major alike) flatline for several minutes…and then come back to life. Even during periods of ultra low load on the system, we still see our JVMs
How do I give Jenkins more heap space when it’s running as a daemon on Ubuntu?
My Jenkins jobs are running out of memory, giving java.lang.OutOfMemoryError messages in the build log. But I used the Ubuntu Package Manager, aptitude, or apt-get to install Jenkins, and I don’t know where to look to change the amount of heap space allocated to Jenkins. Answer There are two types of OutOfMemoryError messages that you might encounter while a Jenkins
Volatile Keyword & the thread local memory [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago.
Why are reference types stored in heap
I do know that in Java, (perhaps in .net too) , primitives are stored on stacks , where as reference types are stored on heaps. My question was that I do not understand the proc/cons for this behavior. Why can’t we reference a memory location inside our stacks instead? . I couldn’t find a proper explanation as I googled (