4 ms·
Linux is already starting to use the counted_by annotation however only applies to variable length array structure members. https://news.ycombinator.com/item?i
by compressedgas 2y ago
Linux is already starting to use the counted_by annotation however only applies to variable length array structure members.
https://news.ycombinator.com/item?id=40732745 https://news.ycombinator.com/item?id=40732745 https://embeddedor.com/blog/2024/06/18/how-to-use-the-new-counted_by-attribute-in-c-and-linux/ https://embeddedor.com/blog/2024/06/18/how-to-use-the-new-co...
This would if it could be applied to parameters and local variables would allow the expression of the same relation to the compiler as CHK_SIZE and
CHK_INOUT_SIZE though they would be annotations applied to pointers and arrays that refer to count variables rather than an annotation applied to the count variable.