Hi gurus,
I ran some tests with VisualVM against my server app and for some reason it creates a whole lot of int[] (even though I never create a int[] in my code). Every time a user logs in VisualVM says that about 10MB of int[]s gets created. When running a heap dump they all disappear (due to the gc linked to the heap dump) and they never stay in memory.
If I run eclipse debug with a breakpoint on the first line at the same time as VisualVM the first line on the server ‘System.out.println(“Starting Server”);’ generates about 10MB of int arrays.
Did anyone run into something similar before? I also ran some checks and when I don’t run the server in debug mode or at the same time as VisualVM it uses a lot less memory (the int[]'s?). What method should I use to get a believable good view of my memory usage? Printing out the runtime.freeMemory sounds like the most reliable way but then I have no insight into what objects are taking up the heap.
Kind regards,
Mike