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

runtime: out of memory: cannot allocate 327434997084454912-byte block (4096000 in use) fatal error: out of memory #39423

Closed
153104373 opened this issue Jun 5, 2020 · 5 comments

Comments

@153104373
Copy link

@153104373 153104373 commented Jun 5, 2020

Excuse me.I want to write a DLL for RSA encryption and decryption. In golang, there is no problem with the program, but I have exported it as a DLL file. I want to call it with C #, and the result indicates that there is not enough memory. How can I solve it?The source file is dll_code.zip.thanks
1
2
3

main.txt

@153104373
Copy link
Author

@153104373 153104373 commented Jun 5, 2020

@153104373
Copy link
Author

@153104373 153104373 commented Jun 5, 2020

@153104373
Copy link
Author

@153104373 153104373 commented Jun 5, 2020

This code is in zip

@jeremyfaller
Copy link
Contributor

@jeremyfaller jeremyfaller commented Jun 5, 2020

Without knowing which version of Go you're using your stack traces aren't the most helpful, and how you're building the binary is important here, which you also don't specify. Without that data, and guessing, I don't think you're building the go code correctly as a shared library.

I'm not terribly familiar with building DLLs in Windows with Go, but the answers over at StackOverflow look correct to me:

https://stackoverflow.com/questions/40573401/building-a-dll-with-go-1-7

I'd bet if you start from that as an example, you'll have it going in no time.

Closing this issue as it doesn't really seem to be a Go issue to me.

@153104373
Copy link
Author

@153104373 153104373 commented Jun 5, 2020

My go version is go1.14.2 windows/amd64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.