Re: ideas for returning memory to the OS

Enrico Weigelt <[email protected]> Tue, 11 Dec 2007 21:19:35 +0100
Newsgroups gmane.comp.mozilla.performance
Message-ID <[email protected]>
* Brian Crowder <[email protected]> wrote:

Hi,

> This isn't that tricky an issue.  The general purpose allocators of
> each of the top-tier operating systems provide these routines so that
> apps that understand their memory needs -can- be tuned more
> optimally.  The library (libc, you suggest, though in reality there
> are non-open-source libraries involved on at least one of our
> platforms) does indeed, as you suggest, provide a general-purpose
> allocation facility well-tuned to the platform.  It does not, however,
> provide specialized allocators well-tuned to the application.

Well, if you need an some allocator with different semantics
(right, there are valid reasons, eg. for zoned allocators, 
garbage collection, etc, which is not provided by posix malloc)
why not simply implementing this as an *separate* package ? 

Several years ago, I needed reference counting and destructors
(in plain-C) for some projects. So I coded an own, independent, 
library for that, which was just imported by the others.

> Swap is certainly not unlimited, 

No, but compared to RAM it's really, really huge. For example, 
on my current notebook, I've got 1GB RAM but 120GB disk space.

> and whether or not it is technically sound criticism or not, 
> Firefox is often criticized for consuming lots of memory. 

That's because it really consumes much RAM. The amount of 
memory really needed (at the same time) is very large.
The dozens of bundled 3rd-party libraries are also part of this.

> > No, I don't think, mozilla's code should do anything in that area.
> > Please fix it at the source -> libc.
> >
> 
> We aren't the keepers of the libc code (not even glibc), 

No, neither are you (or should be) for zlib, sqlite, dbm,
cairo, libjpeg and dozens of other 3rd-party libraries.

> and certainly can't drive the development of msvcrt. 

No, and you shouldn't. Simply not your job.

> How do you propose we solve these issues (even if they are issues 
> of perception) on Windows -- the platform the vast majority of our 
> users are running firefox on?

Not at all. As long as you aren't hired by M$ for that, it's
simply not your job. Concentrate on improving moz instead of 
working around evrybody else's crap.


cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------