Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jssrc2cpg] Pass JVM max memory setting to astgen #4990

Closed
wants to merge 2 commits into from

Conversation

max-leuthaeuser
Copy link
Contributor

@max-leuthaeuser max-leuthaeuser commented Oct 4, 2024

}

private def nodejsSpaceSize: Int = {
Math.max((0.75 * getMaxHeapSizeInMB).toInt, 8192) // as default we set 8G minimum
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that this isn't really a change, but I'm still wondering if setting a (rather high) minimum is the right idea, given that it may exceed the free memory, and/or even the physically available memory.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would assume this memory will be long freed when it needs to be reclaimed by java again. This is done under the assumption the end user will set up java mem thinking that this is all it takes for the cpg process

@max-leuthaeuser
Copy link
Contributor Author

With some local testing it turned out that the nodejs binary astgen we build using pkg does not accept any settings from env variables since this change here: vercel/pkg-fetch@7f3403b

@max-leuthaeuser max-leuthaeuser deleted the max/nodejsMem branch October 4, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants