[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: |
Paul Eggert |
Subject: |
Re: [PATCH] read-file: Avoid memory reallocations with seekable files. |
Date: |
Mon, 13 Dec 2010 09:50:45 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 |
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.