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>
This commit is contained in:
Matt Turner
2014-09-21 14:31:05 -07:00
parent 976464c210
commit e4be17fd04
3 changed files with 15 additions and 8 deletions

View File

@@ -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.
*/