[darcs-users] darcs patch: switch Darcs.Patch.FileName to be ByteString.Char8 int...

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Fri Sep 25 15:52:01 UTC 2009


On Fri, 2009-09-25 at 14:58 +0100, Simon Marlow wrote:

> The underlying problem in your example may be fragmentation, due to the 
> way that ByteStrings are pinned and hence hold on to the whole 4KB block 
> in which they were allocated until they die.  Duncan has been thinking 
> about how to improve the situation, but I'm not sure of the current 
> status - Duncan?


It's a medium term project. There is no short term fix. The problem is
using pinned heap arrays. Switching to unpinned would entail an almost
complete rewrite of the bytestring implementation. That is something I
would like to do however it's not quick, and it would have to pass the
"dons" test, that the results are absolutely definitely as good as the
current version. Don is understandably nervous about upsetting the
existing mature implementation. That would also include the ability to
mmap, which would be lost under a straightforward re-implementation to
use unpinned arrays. Handling mmap'ed ByteArray# is another
mini-project.

Duncan



More information about the darcs-users mailing list