malloc vs ptmalloc2

Brian Fundakowski Feldman green at FreeBSD.ORG
Tue Feb 15 20:11:58 PST 2005


On Mon, Feb 14, 2005 at 02:08:07PM -0800, John-Mark Gurney wrote:
> David Schultz wrote this message on Mon, Feb 14, 2005 at 08:04 -0500:
> > Right, databases, language runtimes, and the small set of other
> > applications for which it really matters usually have their own
> > special-purpose allocators.  I was counting on that when I said
> > that replacing malloc() is unlikely to make a big difference.
> > (One could argue, of course, that it's unfortunate that
> > applications need to do so.)
> 
> Hmmm, maybe we should bring the zone API into userland? :)  It'd be
> nice to have some of the features, like the ctor/dtor's...

Why not just make UMA the userland implementation, too?  It should
only cost us one kernel trap instruction per allocation/deallocation
operation.  With fine-grained kernel locking, why we wouldn't want to
trust the same code to both tasks, and possibly optimize more because
it can do that?

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green at FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\


More information about the freebsd-hackers mailing list