Java using up far more memory than allocated with -Xmx

前端 未结 5 1728
轻奢々
轻奢々 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:39

    Max memory = [-Xmx] + [-XX:MaxPermSize] + number_of_threads * [-Xss]
    

    here max heap memory as -Xmx ,min heap memory as -Xms,stack memory as -Xss and -XX maxPermSize

    The following example illustrates this situation. I have launched my tomcat with the following startup parameters:

    -Xmx168m -Xms168m -XX:PermSize=32m -XX:MaxPermSize=32m -Xss1m
    

提交回复
热议问题