Is it common for gradle to run out of memory while...
# kotlin-native
m
Is it common for gradle to run out of memory while compiling a k/n project? I have 16GB available but having only my DE and IJ running takes ~5GB RAM, but I need to exit IJ every 3 times or so just because it keeps running out of memory with the message "Daemon will be stopped at the end of the build after running out of JVM memory"
d
Well, I'd say it's common for developers to have more than 16GB of ram.
But besides that, it's fairly common in CI that the Daemon runs out of memory and has to be explicitly bumped.
m
So there's nothing I can do about it? AFAIK neither of my laptops has an upgradable ram slit ^^"
d
Not that I can think of.
l
You probably want to set the Gradle JVM heap to 3GB or more.
I'm living with 16GB of RAM (plus about 300 tabs open)
👍 1
😮 1
n
Having the Gradle message appear means that Gradle doesn't have enough memory to build the project. The amount of memory that Gradle requires to do a build varies between projects.
Larger projects will likely require changing a setting to provide more memory to Gradle, which is known for being a very memory hungry build system.
c
I'm doing all work on a mac m1 now and they are only available with up to 16gb. and its much faster than my mac mini with 32gb ram. I also have never seen that gradle warning
n
From experience most Kotlin projects using Gradle won't cause the messages to appear, but it is still prudent to be on the lookout for the issue(s) if it appears later on.
m
It might be the memory allocated by my program and kotlin/native not calling my pseudo-destructor