[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About Buffer Size Restriction
From: |
Kenan Kartal |
Subject: |
Re: About Buffer Size Restriction |
Date: |
Wed, 27 Mar 2024 07:53:37 +0300 |
User-agent: |
Mozilla Thunderbird |
Thanks Mr. Bartlett,
It is good to have these knowledge under the belt in case we need to
work with older hardware.
Regards,
On 26.03.2024 23:47, Jonathan Bartlett wrote:
> Kenan -
>
> Thanks for reaching out.
>
> It's been a while since I wrote this, but, I think it was partially based
> on SSIZE_MAX and partially based on other write operation limits on the
> kernel. Most write operation limits have been increased since then, but,
> among the various things, sockets, files, etc., keeping the write size low
> helps keep you from being on the wrong side of an unpredictable situation.
>
> Jon
>
>
> On Tue, Mar 26, 2024 at 7:57 AM Kenan Kartal <contact@kenankartal.name>
> wrote:
>
>> Hello,
>>
>> In Chapter 5. Dealing with Files - Using Files in a Program; the buffer
>> size in the bss section is suggested to never exceed 16000 for various
>> reasons. What might those reasons be?
>>
>> I like the reading so far. I am writing it for x86_64; so, I presume
>> this restriction doesn't apply. Only thing I have found on my machine
>> (Linux + GNU on x86_64) is that `read` accepts `SSIZE_MAX` which is
>> `INT_MAX`. However, I would still appreciate the reasoning for the
>> original restriction.
>>
>> Sincerely,
>>
>> --
>> Kenan Kartal
>>
>>
>
--
Kenan Kartal