perl malloc slow?

David Schultz das at FreeBSD.ORG
Wed Jan 7 20:28:20 PST 2004

On Wed, Jan 07, 2004, Poul-Henning Kamp wrote:
> One of the assumptions I made ten years ago, was that we would expose
> more of the possible VM gymnastics to userland and in particular it
> was my expectation that it would be cheap for a process to do some
> sort of page-flipping or page-exchange.
> This has not materialized in the meantime, and VMwizards have
> generally been a lot less than enthusiastic about it when I have
> tried to coax them into providing this sort of thing.
> The result is that applications which use realloc() a lot suffer.

FWIW, you can do the required gymnastics with mmap() as long as
the mapped region is backed by a file.  There were some
discussions about a year ago about how to extend that idea to
swap-backed storage.  As I recall, both dillon and wollman wanted
it to happen but disagreed about the API, so one nasty bikeshed
later, it all evaporated.

More information about the freebsd-current mailing list