|
From: | Paul Eggert |
Subject: | Re: [PATCH] stat: don't explicitly request file size for filenames |
Date: | Fri, 5 Jul 2019 16:53:18 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 |
Pádraig Brady wrote:
It would be nice to have areadlink_with_size treat 0 as auto select some lower bound.
Yes, that sounds good. However, I didn't see why that would entail changing SYMLINK_MAX from 1024 to 1023, or why the patch would affect the documented API.
How about the attached patch instead? When the guessed size is zero it typically avoids a realloc by using a small stack buffer.
0001-areadlink-with-size-improve-efficiency.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |