简体   繁体   中英

How to increase java run time heap memory

I am using IntelliJ IDEA. The java file will read a csv file line by line, the file is 3.8GB. I think everything is in one line so that I am getting Out of Heap Memory error while I am using buffer reader to read line by line.

I have edited the idea.vmotions so that -XMx4096m, along with compiler's VM option, and the Run/Debug Comfiguration. 在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

However, the peak usage of my heap memory will not exceed 500mb. 在此处输入图片说明

And the Out of Memory Error remains.

This could be a memory leak. I'd try using the Eclipse Memory Analyzer . It could be better than Intellij's built in one.

This is a great guide I use when I encounter this problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM