[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: What problems may occur if the restriction(i.e. l_alloc should not fail when shrinking the block) is broken?
- From: 孙世龙 sunshilong <sunshilong369@...>
- Date: Thu, 13 Aug 2020 09:24:17 +0800
Hi, list
As per the documentation(i.e.
https://www.lua.org/manual/5.3/manual.html#lua_Alloc),
which says [emphasise mine]:
This code assumes that realloc does not fail when shrinking a block.
(Although Standard C does not ensure this behavior, it seems to be a
safe assumption.)
Then a question arises:
What problems may occur if the restriction(i.e. l_alloc should not
fail when shrinking the block) is broken?
Thank you for your attention to this matter.
Best regards