[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] read-file: Avoid memory reallocations with seekable files.
From: |
Pádraig Brady |
Subject: |
Re: [PATCH] read-file: Avoid memory reallocations with seekable files. |
Date: |
Mon, 13 Dec 2010 22:04:10 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 |
On 13/12/10 17:50, Paul Eggert wrote:
> On 12/13/10 02:09, Pádraig Brady wrote:
>> * Keep allocation to multiples of BUFSIZ which may be more efficient
>
> I don't see how the patch accomplishes this.
> If alloc starts off being BUFSIZ, and the assignment
> "alloc = alloc + alloc / 2" does not keep the allocation
> to a multiple of BUFSIZ. Also, for regular files alloc
> might start off being an odd number.
>
Oops right, I had dropped some code but
forgot to drop the description.
Thanks for the review.
cheers,
Pádraig.