简体   繁体   中英

Java consuming too much memory

I have a java app. Its use is to automate login to websites and create wifi hotspots. It is a GUI app with many features such as a notification manager and system tray. My JAR file has a size of 3 MB but, it consumes about 100 MB of RAM. Should I be worried?

I checked if any of my methods were recursive and I could not find any.

My java app's code can be found here : https://github.com/mavrk/bitm-cyberoam-client/tree/master/JavaApplication13

A one line program can use 8 GB of memory.

If you are concerned about the size of the heap you can either

  • reduce it further, though this might slow the application or prevent it from working.
  • use a memory profiler to see where the memory is being utilised.
  • not worry about about 50 cents worth of memory. If you are minimum wage you shouldn't spend more then 6 minutes on it or your time will be worth more than the memory you save.

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