Skip to content
Advertisement

Tag: heap-memory

Eclipse release heap back to system

I’m using Eclipse 3.6 with latest Sun Java 6 on Linux (64 bit) with a larger number of large projects. In some special circumstances (SVN updates for example) Eclipse needs up to 1 GB heap. But most of the time it only needs 350 MB. When I enable the heap status panel then I see this most of the time:

Java’s enum… Where are they created?

Since enum in C# are on the stack, I was wondering where enum, in Java, where created. On the stack? On the heap? In some mysterious other place? Enumeration in C# are more primitive than those in Java, this might explain why they are created on the stack… Where are they? I can’t find them! Thanks Answer Enums in Java

dynamically increasing java heap space

I have written a java program that tests the speed of a couple of multi-threading algorithms on different machines with various numbers of processors. On some machines, merge sort* fails because it requires a sizable heap space to work on very large arrays. I can easily change the java heap space myself before running the program, but I feel like

Why do threads share the heap space?

Threads each have their own stack, but they share a common heap. Its clear to everyone that stack is for local/method variables & heap is for instance/class variables. What is the benefit of sharing heap among threads. There are several number of threads running simultaneously, so sharing memory can lead to issues such as concurrent modification, mutual exclusion etc overhead.

why use Heap Memory in Java

Why do we use Heap Memory, Can we use Stack memory for the same? EDITED One more question came in my mind after reading answers 1) is there any other kind of memory which we can think of alternative to Heap and Stack? Edited I came across the string pool, is that memory associated with the heap or Stack? Answer

Why does this Java/Groovy code cause heap memory exceptions?

This 3rd party script keeps causing heap memory exceptions: That part of the script, which receives messages through TCP/IP after receiving the message, causes the following exception: Exception in thread “Thread-2” org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.OutOfMemoryError: Java heap space at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:92) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:880) at groovy.lang.Closure.call(Closure.java:279) at groovy.lang.Closure.call(Closure.java:292) at org.codehaus.groovy.runtime.DefaultGroovyMethods$6.run(DefaultGroovyMethods.java:11563) at java.lang.Thread.run(Thread.java:636) Caused by: java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2746)

Increasing JRE Memory Usage in Eclipse

I read in another question that you can increase the JRE memory allowance for an app through Window -> Preferences in Eclipse, but I can’t seem to find anything related to heap memory allocation. Editing -xms/xmx values in eclipse.ini doesn’t help since those are for Eclipse itself. Answer I believe when Run > Debug Configuration (or Run Configuration), then Arguments

Advertisement