antirez / antirez/sds

Consider using attribute counted_by

オープン
#155 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C
スター
5.6k
フォーク
510
PR マージ指標
30日以内にマージされた PR はありません

説明

IDK if it's applicable here, but recent versions of clang and gcc have added support for having the compiler insert runtime checks when you have a flexible array member and a distinct member for a count, that upon access to the flexible array member, the compiler will insert checks against the count member (which may be optimized out as being redundant if there are explicit length checks).

https://people.kernel.org/gustavoars/how-to-use-the-new-counted_by-attribute-in-c-and-linux

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。