Re: memory management suggestion - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: memory management suggestion
Date
Msg-id 200006130008.UAA11578@candle.pha.pa.us
Whole thread Raw
List pgsql-hackers
Here is a followup to it.

> Karel Zak <zakkr@zf.jcu.cz> writes:
> >   Create from this non-used residual space chunk and remove it into free 
> >   chunk list. 
> 
> There's at least one bug in that code: the minimum acceptable chunk size
> is not MAXALIGN(1), but 1 << ALLOC_MINBITS, and after that it goes up by
> powers of 2.  You are putting the chunk into a freelist based on which
> freelist would be used to allocate a request for X amount of space...
> but it had better go into a freelist based on being large enough for the
> largest request that would be directed to that freelist, instead.  As is,
> the chunk could be handed out to someone who would scribble past the
> allocated end of the block.
> 
> -----> A tested patch (hmm, we are freeze, possible for 7.0.?):
> 
> It's getting pretty late in the cycle for this sort of thing.
> We should consider it for 7.1, after you get it right...
> 
>             regards, tom lane
> 


--  Bruce Momjian                        |  http://www.op.net/~candle pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: memory management suggestion
Next
From: Denis Perchine
Date:
Subject: Re: Caching number of blocks in relation to avoi lseek.