diff options
author | Matt Turner <mattst88@gmail.com> | 2014-09-21 14:31:05 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2014-09-25 13:52:55 -0700 |
commit | e4be17fd04adb5404207bcd260cdd26cbd931c3f (patch) | |
tree | 606709a144f05bf4d2eabf5add86b4bc0a401c9a /src/util/macros.h | |
parent | 976464c210816ff0c90e2e24e766dda81193fc79 (diff) |
ralloc: Mark ralloc functions with gcc's malloc attribute.
Cuts a few hundred bytes from the DRI drivers, so it must give gcc some
extra information.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/util/macros.h')
-rw-r--r-- | src/util/macros.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/macros.h b/src/util/macros.h index a9867b41354..40ebf02da84 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -87,6 +87,12 @@ do { \ #define PRINTFLIKE(f, a) #endif +#ifdef HAVE_FUNC_ATTRIBUTE_MALLOC +#define MALLOCLIKE __attribute__((__malloc__)) +#else +#define MALLOCLIKE +#endif + /* Used to optionally mark structures with misaligned elements or size as * packed, to trade off performance for space. */ |