1
0
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:
Yasuhiro-gh
2023-04-27 20:37:18 +10:00
committed by Daniel Black
parent cee9b3b850
commit 26b96094ec
2 changed files with 6 additions and 0 deletions

View File

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