Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse not releasing console (log) memory after clearing

Tags:

java

eclipse

My Eclipse footprint is steadily increasing from 500MB to >1GB without me doing anything in particular - just running some log heavy programs. Doing a manual GC, closing and reopening projects does not help at all, once it's over 1GB it stays there.

I've run jvisualvm and found out from the heapdump that hundreds of megabytes are char[] representing log output.

I make it a habbit to close all the consoles of stopped processes, so it's not that. Console buffer is set to 1MB (characters). I've closed the console view and reopened it again.

I can paste my particular eclipse.ini but I've tried different GC and memory settings, different JVMs, different Eclipse versions - behavior is still the same.

To me it seems that the logs are getting stuck with a reference somewhere and never get released. Is anyone else having this problem? Is there a setting somewhere to release memory from old console views?

like image 209
brainwash Avatar asked Sep 11 '12 16:09

brainwash


1 Answers

While I thought about something smart to write here I found this: How to reduce Eclipse's memory usage? Where the suggestion to disable spellchecking actually made a lot of difference.

So.. here is my own contribution: This might sound strange, but I've also noticed myself having a lot of unused breakpoints makes Eclipse sluggish. Regularly clearing all break points is a sound habit.

This is just a tip related to this, there's an option to show memory and to force an GC from within Eclipse. Under

Preferences>General>Show Heap Status

like image 68
Peter Avatar answered Sep 17 '22 18:09

Peter