Setting heap size in IntelliJ IDEA correctly

前端 未结 2 1800
失恋的感觉
失恋的感觉 2020-12-17 17:20

I have this peculiar problem with running a Processing application in IntelliJ IDEA. I want to save a large image and to do this I run in to the following exception:

相关标签:
2条回答
  • 2020-12-17 17:32

    IntelliJ shows you the amount used and the current size of the heap. You are trying to set the maximum which it does not show.

    You can attach VisualVM to IntellIJ to see the maximum by running jvisualvm

    0 讨论(0)
  • 2020-12-17 17:36

    Changing vmoptions file adjusts the memory used by IntelliJ, but what you're having here is a shortage of memory of JRE that is launched by IntelliJ to execute your application. You need to adjust the memory setting in VM options part of the Run/Debug configuration, for example:

    enter image description here

    0 讨论(0)
提交回复
热议问题