mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
MDEV-23865 Create malloc function attribute
This commit is contained in:
committed by
Daniel Black
parent
cee9b3b850
commit
26b96094ec
@@ -156,6 +156,7 @@ program. The paths leading to call of cold functions within code are
|
||||
marked as unlikely by the branch prediction mechanism. optimize a
|
||||
rarely invoked function for size instead for speed. */
|
||||
# define ATTRIBUTE_COLD __attribute__((cold))
|
||||
# define ATTRIBUTE_MALLOC __attribute__((malloc))
|
||||
#elif defined _MSC_VER
|
||||
# define ATTRIBUTE_NORETURN __declspec(noreturn)
|
||||
# define ATTRIBUTE_NOINLINE __declspec(noinline)
|
||||
@@ -168,6 +169,10 @@ rarely invoked function for size instead for speed. */
|
||||
# define ATTRIBUTE_COLD /* empty */
|
||||
#endif
|
||||
|
||||
#ifndef ATTRIBUTE_MALLOC
|
||||
# define ATTRIBUTE_MALLOC
|
||||
#endif
|
||||
|
||||
#include <my_attribute.h>
|
||||
|
||||
#endif /* MY_COMPILER_INCLUDED */
|
||||
|
Reference in New Issue
Block a user