Hi Andy,

Thanks for the patch.  I don't have time to look at it right now, but
I'll hopefully get to it soon.

I don't think there's a bug in the current implementation.  You'll
notice that when we coalesce with the previous block, we find the block
head before checking its flags, so only the block head needs to have the
BF_FREE flag set.

Cheers,
        Simon

On 01 July 2005 12:06, Andrew Cheadle wrote:

> Hi Simon,
> 
> Here's a HEAD patch for the block allocator that removes (I think ;-])
> the more subtle O(N^2) portion of the allocator namely when performing
> block descriptor initialisation.
> 
> I should also comment that I think there's a bug in the merge of
> my original patch with HEAD where BF_ALLOCATED was switched to
> BF_FREE - I think I'm correct in saying that if you do this, then the
> last block descriptor in a block chunk must also have it's flags set
> to BF_FREE 
> so that predecessor coalescing may occur (in addition on allocation
> these must also be cleared). I've remedied this (I hope ;-]) in the
> attached patch.
> 
> Let me know your thoughts!
> 
> Cheers
> 
> Andy
> 
> On Sun, 5 Jun 2005, Andrew Cheadle wrote:
> 
>> Hi Simon,
>> 
>> Here's a patch for the block allocator that reduces the coalescing
>> algorithm from O(N^2) to N. 
>> 
>> I created the mods and tested them on my 6.2 builds and then prop'd
>> them to the current 6.4 CVS HEAD. When I get a chance and HEAD is
>> unb0rked I'll test them on it. Hopefully the attached patch as is
>> fine though ;-) Any problems/bugs/idiocy let me know!
>> 
>> Cheers
>> 
>> Andy
>> 
>> *********************************************************************
>> *  Andrew Cheadle                    email:  [EMAIL PROTECTED] *
>> *  Department of Computing           http://www.doc.ic.ac.uk/~amc4/ *
>> *  Imperial College                                                 *
>> *  University of London                                             *
>> *********************************************************************
> 
> *********************************************************************
> *  Andrew Cheadle                    email:  [EMAIL PROTECTED] *
> *  Department of Computing           http://www.doc.ic.ac.uk/~amc4/ *
> *  Imperial College                                                 *
> *  University of London                                             *
> *********************************************************************

_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to