-
I am participating in a competitive audit and that is what I discovered: There is a terribly large amount of code in actual work, so that the compiler seems to fail. The code I am auditing is composed of over 400 files, and it can't compile successfully in my WSL Ubuntu.
My computer is a brand new one with i5-13500HX, RTX4060 and 16GB RAM. It should be able to carry solc well. I discover that the memory of my WSL ubuntu is not 16GB but 8GB, which might be not enough. Is this the reason why I can't compile? If so, how to enlarge the memory of WSL? If not, how can I compile a huge Foundry project successfully?
(or, maybe, linux thinks that solc comsumes too much resources and thus kills this thread???) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I have to admit that enlarging the memory limit is an effective approach! And it is not hard. I hope this could help others with the same issue. All you need to do is to create a new file named
Then restart your wsl with the command in your WINDOWS TERMINAL:
Reopen your ubuntu, now it has a 15GB RAM, which can compile a lot of stuffs.
(god damn solc! i hope 15GB is enough for all projects, or one day i have to go to buy a 32GB RAM...) |
Beta Was this translation helpful? Give feedback.
I have to admit that enlarging the memory limit is an effective approach! And it is not hard. I hope this could help others with the same issue.
All you need to do is to create a new file named
.wslconfig
inC:/Users/[YOUR USERNAME]/
with the content below input and saved:Then restart your wsl with the command in your WINDOWS TERMINAL:
Reopen your ubuntu, now it has a 15GB RAM, which can compile a lot of stuffs.