Hacker News new | ask | show | jobs
by diogenes4 1001 days ago
> If your memory usage doesn't plateau you have a memory leak which would be caused by a bug in your code or a dependency.

Extremely bold claim for a framework the size of ruby on rails. I would trot out my own evidence but the receipts are lost with time.

Also—why isn't the allocation behavior tweakable at runtime? Seems pretty trivial with no downsides. It's not difficult to think of a scenario where a non-monotonically-increasing-heap-size is desirable.

1 comments

This person is incorrect, but even if they were correct, that wouldn't be a framework thing.

Memory management is handled by the language.

Many types of memory leaks are simply because you're holding on to data you don't need to hold onto anymore. Languages cannot prevent this, at least not that I've seen.
Sure, but the person I responded to was suggesting that Rails was deliberately holding onto memory to re-use it.

That's absolutely not something Rails does, but it is something that some managed languages and some (most?) allocators do.