Re: malloc problems with MySQL?

From: Paul Allen <nospam_at_ugcs.caltech.edu>
Date: Wed, 26 Apr 2006 16:56:49 -0700
>From Jason Evans <jasone_at_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
Received on Wed Apr 26 2006 - 21:56:49 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:55 UTC