> > >I can understand that IDEA is working on things in the background, but >something that takes near 2M of memory is pretty big. The really worrisome >bit, though is that it's not being 100% garbage collected after each cycle. > This is normal and is caused by HotSpot's generational garbage collector.
Part of the memory allocated for objects is reserved for a nursery, where new objects are created. The nursery is filled like a stack, so memory allocation simply increases a pointer and checks for overflow which makes memory allocation cheap. Once the nursery is full, a miniature garbage collection checks the objects in the nursery. Often most of them are temporary objects which are no longer used, so only a few objects are actually live. Those live objects are moved to the main heap, and the rest are deallocated simply by resetting the nursery stack pointer (so deallocation time is independent of the number of discarded temporary objects). This is what you see when memory consumption jumps from 28 down to 26 MB. Of course, some of the objects in the main heap will eventually also become unused, but they will not be collected until the entire heap is full -- or until you call System.gc() by pressing the garbage can button. That's why memory consumption goes from 27-28-27 to 28-29-28 to 29-30-29. _______________________________________________ Eap-list mailing list [EMAIL PROTECTED] http://www.intellij.com/mailman/listinfo/eap-list
