antirez / antirez/sds

Consider using attribute counted_by

Đang mở
#155 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C
Star
5.6k
Fork
510
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.