Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe I'm just jaded, but this seems like a really basic primer on memory management. Is mozilla failing to meet these standards? Somehow my guess is that the challenges facing the project are a bit more sophisticated. I have absolutely no evidence to support that supposition however.


This is a page from the Gnome developer guidelines. It's not about Firefox per se. And it looks pretty old to me; they're talking about "Mozilla" as a product, which it hasn't been for several years now. My guess is that this was written during the early push for Gnome 2.0, maybe four years ago.

It's sane (if unsurprising) advice. Using it as evidence for the current state of Firefox's memory management strikes me as a poor idea.


Stronger evidence for the current state of Firefox's memory management comes from the Windows Task Manager ;-)

(284M and counting! Yesterday my Linux Firefox was at upwards of 350M, though it's now at 144M after restarting it.)


It is very basic - but then again, just about any concept in coding is when you look at it from the perspective of the principals involved. But take something basic (a malloc command) - pass the object around back and forth, left and right, across multiple classes and libraries, casting it this way and that, and you'll realize that you've got objects that aren't being freed right - and when you attempt to free them, you're application will crash since other bits of code need access to what you just trashed from the memory.

I'm not defending the FF team - I think they've done a terrible job managing memory in their browser... but it's an understandable mistake and doesn't come from ignoring the rules so much as it is not picturing the entire codebase in your head when passing objects around.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: