17,800 results
Open links in new tab
  1. jvm - How to deal with "java.lang.OutOfMemoryError: Java heap space ...

    Easy way to solve OutOfMemoryError in java is to increase the maximum heap size by using JVM options -Xmx512M, this will …

  2. java.lang.OutOfMemoryError: Java heap space - Stack Overflow

    If you want to increase your heap space, you can use java -Xms<initial heap size> -Xmx<maximum heap size> on the command …

  3. Stack Memory and Heap Space in Java - Baeldung

    Jul 1, 2024 · Heap space is used for the dynamic memory allocation of Java objects and JRE classes at runtime. New objects are …

  4. Resolving Java Heap Space OutOfMemoryError - Stackify

    Sep 12, 2024 · Java heap space is a portion of memory allocated to a Java application by the JVM (Java virtual machine) at runtime. …

  5. Understand the OutOfMemoryError Exception - Oracle

    Usually, this error is thrown when there is insufficient space to allocate an object in the Java heap. In this case, The garbage …

  6. -Xmx and -Xms: The Complete Guide to Java Heap Size

    May 25, 2026 · Learn what -Xmx and -Xms do, how to set them correctly, default values by Java version, common errors, and how to …

  7. How to control Java heap size (memory) allocation (xmx, xms)

    Jan 31, 2026 · When setting the Java heap size, you should specify your memory argument using one of the letters “m” or “M” for …

  8. Java Heap Space Memory with the Runtime API - Baeldung

    Jan 8, 2024 · The Runtime#freeMemory method returns the free heap space available for new object allocations in bytes. It may …

  9. JVM Heap Area - GeeksforGeeks

    Sep 10, 2026 · Below image illustrates how Java allocates memory for objects using the stack and heap areas. It shows reference …

  10. Java OutOfMemoryError: Causes, Fixes and Heap Dumps

    Oct 17, 2026 · The message Java heap space means that a new object did not fit into the heap after garbage collection. It does not …