this post was submitted on 04 Jul 2023
993 points (99.1% liked)
Lemmy.World Announcements
28383 readers
3 users here now
This Community is intended for posts about the Lemmy.world server by the admins.
Follow us for server news 🐘
Outages 🔥
https://status.lemmy.world
For support with issues at Lemmy.world, go to the Lemmy.world Support community.
Support e-mail
Any support requests are best sent to [email protected] e-mail.
Report contact
- DM https://lemmy.world/u/lwreport
- Email [email protected] (PGP Supported)
Donations 💗
If you would like to make a donation to support the cost of running this platform, please do so at the following donation URLs.
If you can, please use / switch to Ko-Fi, it has the lowest fees for us
Join the team
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Lemmy has a memory leak? Or, should I say, a "lemmory leak"?
A pretty bad one at that...
But... but... Rust...
Rust makes holes and that's how leaks happen
Underrated comment
Rust protects you from segfaulting and trying to access deallocated memory, but doesn't protect you from just deciding to keep everything in memory. That's a design choice. The original developers probably didn't expect such a deluge of users.
Leaking memory is safe
I’m calling it - if there’s actually a memory leak in the Rust code, it’s gonna be the in memory queues because the DB’s iops can’t cope with the number of users.
On some of the latest release candidates I think so.
A lemmory meek, obviously!
Wait isn't lemmy written in rust how do you create a memory leak in rust? Unsafe mode?
That's not a memory leak though. That's just hording memory. Leaked memory is inaccessible.
In the example it’s inaccessible.
It's not. The vec is still accessible and if it goes out of scope rust automatically clears the memory.
But it will never fall out of scope because of the loop
Exactly but it's still accessible since it's in scope.
Exactly.