[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Are there some potential problems if I use a self-defined memory acquirement function instead of realloc(3) in the l_alloc function?
- From: Andrew Gierth <andrew@...>
- Date: Tue, 11 Aug 2020 03:10:14 +0100
>>>>> "Philippe" == Philippe Verdy <verdyp@gmail.com> writes:
Philippe> I don't think thank shrinking or keeping the same size may
Philippe> fail
It doesn't matter what you think. What matters is what the language
standards say, and what they say is that realloc() is permitted to fail
when shrinking a block. (Some realloc implementations never fail in that
case, but many in common use do.)
--
Andrew.