News for hackers. Stuff that matters.
Re:Identifying Rust's collect:<Vec<_>>() memory leak footgun by ongy on Thursday January 18, 2024 @11:40PM (#39051630)
In the Haskell world there's a bit of a cheap differentiation for this kind of leak.

Memory leak: classical C style, fully lost in memgrind (runtime bug) Space leak: Some memory structure requires significantly more memory than it should. E.g. keeping a (lazy) ref to a large blob, around that keeps it in memory.

The effect is largely the same, but the latter is almost harder to spot, since the tooling cannot be as general as memgrind.

Re:Identifying Rust's collect:<Vec<_>>() memory leak footgun by crotchfire on Friday January 19, 2024 @03:57AM (#39053221)
Also the latter is the bane of lazy languages, which make space leaks both commonplace and extremely difficult to notice.
Re:Identifying Rust's collect:<Vec<_>>() memory leak footgun by saagarjha on Saturday January 20, 2024 @10:05PM (#39075138)
Generally having a reference for something for longer than you should is a different kind of problem from “the vector never resizes down”.