I understand that when the Eden is full, a minor garbage collection is done. Surviving objects go to the survivol spaces. These objects will eventually arrive to the old generation. Does the objects in the survivol spaces get garbage collected as well, or they will just be moved to the tenure generation and be GC there later (so the survivol
Tag: garbage-collection
JVM: Non-heap memory causes OutOfMemoryError because the Garbage Collector is not run. What am I doing wrong?
I’ve encountered a weird issue where the Groovy application I’m working on grows to consume more memory (far beyond the limits of the xmx-argument, so it can’t be the heap) until the computer runs out of RAM, at which point the JVM behaves in one of two different ways – it either suddenly frees (almost) all the memory it has
Are objects inside a static list eligible for garbage collection?
I know that static variables are not eligible for garbage collection for as long as the class is loaded but i was wondering if that is the same case for it’s object contents. I have this static List which contains a class object references. Are “someObject” eligible for garbage collection if no one’s referencing them? Answer I was wondering if
JPA pagination query becomes slower with every subsequent call
Project has Spring Boot with JPA. We have a table vehicle with 1m+ records. Table has an indexed field type. We have a use case, where we want to fetch all the records by type. For each type, we get all the vehicle records, then for next type, then for next and so on. Since there are 1m+ records, we
Criteria for default garbage collector Hotspot JVM 11/17
I found a source describing that the default gc used changes depending on the available resources. It seems that the jvm uses either g1gc or serial gc dependnig on hardware and os. The serial collector is selected by default on certain hardware and operating system configurations Can someone point out a more detailed source on what the specific criteria is
Jprofile to analysis meomery leak in hprof where there is plenty of hashmap entries
I took over a JAVA-WEB based SOA system recently and it doesn’t runs that well untill now. One of the springboot applications will take up up to 100% of the CPU use. By using jastack I get to know that most of the Cpu use was made by GC threads, for there are something in jvm that cannot be collected
Is the System.gc() call in sun.nio.ch.FileChannelImpl a bad case?
From jdk/FileChannelImpl.java at jdk8-b120. Does this help with exception recovery? Answer When an object allocation fails with an OutOfMemoryError, the garbage collector did already try its best to reclaim memory of unused objects or expanding the heap. So calling System.gc() after catching OutOfMemoryError would be pointless. A special case is the situation when the garbage collector repeatedly did reclaim a
CMS GC – How to profile young gen heap?
I’m able to use jmap command to dump JVM memory heap. The issue is, I have a program with heavier young gen GC activities compared to the previous version when checking from the GC logs, and when I ran memory profiler, the biggest objects are always the ones in the old gen. So it makes troubleshooting more difficult when you
How can we know whether an object is marked as garbage by GC?
Is there any tool to visualize the status of GC on a specific object? Answer If you can access the object, it is trivially not collectable. The JVMTI system (Java Virtual Machine Tool Interface) lets other processes link up to a JVM and get stats from it. It’s what debuggers and profilers use; visualvm (ships with most JDKs) can do
Cold streams and publishers, is the Garbage Collector fully aware of its true death?
When instanceSubscriptorManager is unable to receive any more boolean values, the last thing to be performed will be a false as isActive, removing localConsumer from publisher. How is localConsumer “aware” that instanceSubscriptorManager will be unable to receive an isActive -> true (again) sometime in the future, especially since the class is self-referencing itself? In short, this class is hold by