ns-usbloader
ns-usbloader copied to clipboard
High memory usage on Mac
Describe the bug (mandatory) After running the app for an hour or so the memory usage is over 5GB. One time it got up to 8GB
Information about environment (mandatory):
- OS: macOS 12.2.1 arm64 (m1)
- Java version openjdk version "11.0.14.1" 2022-02-08 LTS OpenJDK Runtime Environment Zulu11.54+25-CA (build 11.0.14.1+1-LTS) OpenJDK 64-Bit Server VM Zulu11.54+25-CA (build 11.0.14.1+1-LTS, mixed mode)
Steps to reproduce On macOS open the app and use it for an hour. I transferred games over usb during this time
Expected behavior Memory usage stays at an acceptable level
Screenshots and/or information from application log

Did you see this issue in previous versions? Don't know
Additional context Add any other context about the problem here
What do you think @developersu about calling the garbage collector to maintain an acceptable use of the RAM? If you want I could try it.
@manuelsblanco sure, go ahead =)
Also we can just run application with -Xmx1g flag so it will limit memory usage, thus garbage collector will be calling more frequently without any code changes.
AFAIK java automatically allocates some (huge) amount of virtual memory. No matter how much memory you have it's like some percent of it.
@developersu
I'm going to think of several strategies to reduce the use of RAM, maybe call the gc() and use the right type of primitive to save memory.
@developersu
Can you guide me in order to solve this?
Failed to execute goal on project ns-usbloader: Could not resolve dependencies for project loper:ns-usbloader:jar:6.2: Could not find artifact ru.redrise:libKonogonka:jar:0.1-SNAPSHOT
@manuelsblanco Ok, I guess it's fixed now. You can try again with latest sources.