diff options
author | Jack Lloyd <[email protected]> | 2019-02-17 15:02:34 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-02-17 15:02:34 -0500 |
commit | 3c4e3115f660b4ae3e96996c632fe09ffdb28ccb (patch) | |
tree | 6fefa95562b0bb69be3a1a332a8658d419af4871 /src/lib/utils/compiler.h | |
parent | 01dc31d1f6a154e1623dbf6d5a0a689e3ed8b57e (diff) |
Add additional annotations for malloc functions
May help codegen slightly.
Diffstat (limited to 'src/lib/utils/compiler.h')
-rw-r--r-- | src/lib/utils/compiler.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/utils/compiler.h b/src/lib/utils/compiler.h index 9dfbd9fa2..3e41daed0 100644 --- a/src/lib/utils/compiler.h +++ b/src/lib/utils/compiler.h @@ -84,7 +84,7 @@ * Define BOTAN_MALLOC_FN */ #if defined(__GNUG__) || defined(__clang__) - #define BOTAN_MALLOC_FN __attribute__ ((malloc)) + #define BOTAN_MALLOC_FN __attribute__ ((malloc, returns_nonnull, alloc_size(1,2))) #elif defined(_MSC_VER) #define BOTAN_MALLOC_FN __declspec(restrict) #else |