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

Disable CGO on windows #776

Merged
merged 2 commits into from Nov 23, 2021

Conversation

directionless
Copy link
Contributor

@directionless directionless commented Nov 23, 2021

Problem

On windows, launcher seems to use a lot of disk space.

It's not wholly clear to me why. vmmap shows that it's all in the heap. Notably, golang/go#22439 describes this problem pretty well. The discussion there is that a confluence of windows memory management, and go stack allocations end up in go requesting far more memory than intended, and that this is only a problem because windows locks it in memory (as opposed to treating it as virtual addresses)

The fix described in that PR, is a revert in go that changes the stack allocation to be smaller. But when compiling with CGO it's still large.

Windows does not need cgo -- Linux does, and I simply added it everywhere. So, on a hunch, let's disable cgo on windows.

I have a hunch cgo on windows is causing _big_ issues. Disable it.
@directionless directionless merged commit 02700c0 into kolide:master Nov 23, 2021
@directionless directionless deleted the seph/no-cgo-on-windows branch November 23, 2021 14:24
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.

None yet

2 participants