cvs commit: fptools/ghc/includes Block.h fptools/ghc/rts
BlockAlloc.c FrontPanel.c RetainerProfile.c
Simon Marlow
simonmar at microsoft.com
Mon Jun 13 08:35:03 EDT 2005
On 13 June 2005 13:30, Simon Marlow wrote:
> simonmar 2005/06/13 05:29:49 PDT
>
> Modified files:
> ghc/includes Block.h
> ghc/rts BlockAlloc.c FrontPanel.c
> RetainerProfile.c
> Log:
> Block allocator performance fix: instead of keeping the free list
> ordered, keep it doubly-linked, and introduce a new flag BF_FREE so
> we can tell when a block is free. We can still coalesce blocks on
> the free list because block descriptors are kept consecutively in
> memory, so we can tell based on the BF_FREE flag whether to
> coalesce with the next higher/lower blocks when freeing a block.
>
> This (almost) make freeChain O(n) rather than O(n^2), and has been
> reported to help a lot when dealing with very large heaps.
Forgot to mention: the patch is from Andy Cheadle <amc4 at doc.ic.ac.uk>,
with some modifications by me.
Cheers,
Simon
More information about the Cvs-ghc
mailing list