from mozilla/lmdb : Mark infrequently used functions as cold rather than manually putting them in a separate section (205300e)

lofire0_1_0
Niko 2 years ago
parent b0ab9a151c
commit d6f40c33d3
  1. 11
      libraries/liblmdb/mdb.c

@ -251,13 +251,10 @@ union semun {
# error "Two's complement, reasonably sized integer types, please" # error "Two's complement, reasonably sized integer types, please"
#endif #endif
#ifdef __GNUC__ #if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 2) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
/** Put infrequently used env functions in separate section */ /** Mark infrequently used env functions as cold. This puts them in a separate
# ifdef __APPLE__ * section, and optimizes them for size */
# define ESECT __attribute__ ((section("__TEXT,text_env"))) #define ESECT __attribute__ ((cold))
# else
# define ESECT __attribute__ ((section("text_env")))
# endif
#else #else
#define ESECT #define ESECT
#endif #endif

Loading…
Cancel
Save