util/PeakBuffer, ...: use [[gnu::]] attributes

This commit is contained in:
Max Kellermann
2022-04-26 20:19:31 +02:00
parent ce88dee14d
commit a742e1fc71
11 changed files with 20 additions and 28 deletions

View File

@@ -83,7 +83,7 @@ public:
* Get the buffer, and guarantee a minimum size. This buffer
* becomes invalid with the next Get() call.
*/
gcc_malloc gcc_returns_nonnull
[[gnu::malloc]] [[gnu::returns_nonnull]]
T *Get(size_t size) {
if (gcc_unlikely(size > capacity)) {
/* too small: grow */