Java using up far more memory than allocated with -Xmx

前端 未结 5 1719
轻奢々
轻奢々 2020-12-25 11:45

I have a project I\'m writing (in Java) for a class where the prof says we\'re not allowed to use more than 200m I limit the stack memory to 50m (just to be absolutely sure)

5条回答
  •  我在风中等你
    2020-12-25 12:30

    Have you tried using JVisualVM?

    http://docs.oracle.com/javase/6/docs/technotes/tools/share/jvisualvm.html

    I've often found it helps me track this stuff down. It will show you how much of each kind of memory is being used in even let you drill in and find out what.

提交回复
热议问题