Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Apr 2006 16:56:49 -0700
From:      Paul Allen <nospam@ugcs.caltech.edu>
To:        Jason Evans <jasone@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: malloc problems with MySQL?
Message-ID:  <20060426235649.GB29737@barf.ugcs.caltech.edu>
In-Reply-To: <444FD673.3070004@FreeBSD.org>
References:  <444F71F3.6030901@fsn.hu> <444F83AD.9040207@FreeBSD.org> <20060426182837.GA29737@barf.ugcs.caltech.edu> <444FD673.3070004@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>From Jason Evans <jasone@freebsd.org>, Wed, Apr 26, 2006 at 01:22:11PM -0700:
> This code behaves as intended.  Note that in order to get chunk-aligned 
> memory via mmap(), it is necessary to over-allocate, then trim.  By 
> keeping a cache of unmapped chunks, we can avoid the extra system calls 
> most of the time, and we are also able to reduce memory fragmentation in 
> many cases. (Over-allocation and trimming fails to utilize chunk-sized 
> holes in the memory map.)
Yes, I see... perhaps mmap should be enhanced to take an optional alignment
parameter. :o)

                                   Paul



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060426235649.GB29737>