View Single Post
Posts: 376 | Thanked: 511 times | Joined on Aug 2009 @ Greece
#170
Originally Posted by zimon View Post
@v13: I think we are talking about little different heap memory fragmentation problems and effects here. I am mainly concerned (in this Java vs C++ issue) the increased pagefaults due to increasing heap memory fragmentation in long living OOP programs like www-browser. The problem with fragmentation is that locality of the objects is getting worse.
I believe that we're talking about the same thing (but I may be wrong). First, I don't understand how pagefaults are related to memory fragmentation. In fact, I'd think that pagefaults are an inverse function of memory fragmentation since with fragmentation it would be possible to reuse the same memory without needing a pagefault to extend the process's VM.

Originally Posted by zimon View Post
I do see Firefox still taking too much available RAM when it is runnign long time, but that is not why I restart it every few days, because the machine do not start swapping yet. But firefox seem to get slow, and restarting it makes a real difference. I notice this also if I disable flash. Javascript engine in Firefox has pretty good GC nowadays, so I don't think that is a problem but C++ memory management itself.
As it was mentioned on other posts, Firefox implements its own memory management and thus it suffers from memory fragmentation. It is really a bad example since (to my knowledge) it doesn't use the underlying OS's libraries for memory management.

Also, since Firefox is a really really complex and very big program, you should not use it as a reference. At least not unless you compare it with a browser written in java.

So the question stands: Do you have any (comparable with java) example of memory fragmentation in C under Linux?