Re: ideas for returning memory to the OS

Enrico Weigelt <[email protected]> Tue, 11 Dec 2007 23:23:57 +0100
Newsgroups gmane.comp.mozilla.performance
Message-ID <[email protected]>
* Colin Barrett <[email protected]> wrote:
> Enrico Weigelt wrote:
> > 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 ? 
> 
> Is this a packaging issue or a resources issue? 

Both. Plus an complexity issue.

> It's not like we are writing our *own* malloc implementation from 
> scratch. We are looking at custom allocators, see stuart's blog, 
> and thinking about ways to tune those to better meet our specific needs.

That okay. Using and improving other's/already existing work is 
most times a wise decision :)

BUT: the first step should be agreeing on required semantics. 
Then choose an proper interface, which reflects these semantics.
After this point, that interface is an *strict* border, which 
nobody is allowed to cross. The interface then is an contract,
why clients may absolutely rely on. 
That's the essence of modular and constraint-based design ;-P


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/
---------------------------------------------------------------------