It could also be some infinite recursion/iteration going on instead of a memleak. Have you tried splitting your project into multiple crates? a 6k loc crate is somewhat large for a crate imo.
It could also be some infinite recursion/iteration going on instead of a memleak. Have you tried splitting your project into multiple crates? a 6k loc crate is somewhat large for a crate imo.
What is "imo"?
According your adivce, I will separate my crate into several ones.
Thank you for your comment!
Sorry for the internet slang. "imo" is "in my opinion".
If the issue still occurs, I'll be in a smaller crate, so you can keep splitting it up until you find the exact issue. If it's a Rust-issue, please post a bug report.
Such catastrophic memory use is very atypical e.g. libcore is 17K lines of actual code (32K including comments and blanks) and only requires 300MB of RAM to compile in debug mode. It will likely be caused by one specific function or module which means that splitting a crate is unlikely to solve the problem, other than narrowing down what is causing it. The latter can probably be done better by just commenting/#[cfg]ing off parts of the problematic crate until it is clear what makes the memory use explode.