Am I doing this right? (File byChunk)
Andrej Mitrovic
andrej.mitrovich at gmail.com
Mon Sep 13 09:00:25 PDT 2010
That could be a good idea.
On Mon, Sep 13, 2010 at 1:09 PM, bearophile <bearophileHUGS at lycos.com> wrote:
> In byChunk() the content of buffer is reused across calls, so you are not wasting allocations. I don't know if it's possible to use a fixed-size char[4096] array to remove the first memory allocation too. I think byChunk() needs a second optional argument, to give it a preallocated buffer (like a slice of a fixed-size array).
>
> Bye,
> bearophile
>
More information about the Digitalmars-d-learn
mailing list