malloc vs ptmalloc2
David Schultz
das at FreeBSD.ORG
Mon Feb 14 05:05:30 PST 2005
On Mon, Feb 14, 2005, Andrew MacIntyre wrote:
> David Schultz wrote:
> >Other than that, I don't know enough
> >details about ptmalloc to speculate, except to say that for most
> >real-world workloads on modern systems, the impact of the malloc
> >implementation is likely to be negligible. Of course, test
> >results would be interesting...
>
> Some language interpreters by design malloc()/realloc()/free() memory
> constantly. Python being a well known example of such an interpreter.
>
> Because the issues with memory allocators are legion in the context of a
> multitude of platforms, Python eventually gained a highly specialised
> allocator geared to its usage patterns (which brought some other
> benefits with it too). I think I've seen references to Perl doing
> something similar.
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.)
More information about the freebsd-hackers
mailing list