diff options
Diffstat (limited to 'storage/perfschema/pfs_global.h')
-rw-r--r-- | storage/perfschema/pfs_global.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/storage/perfschema/pfs_global.h b/storage/perfschema/pfs_global.h index 693153cb097..cddf688ddf4 100644 --- a/storage/perfschema/pfs_global.h +++ b/storage/perfschema/pfs_global.h @@ -16,6 +16,9 @@ #ifndef PFS_GLOBAL_H #define PFS_GLOBAL_H +#include "my_global.h" +#include "my_compiler.h" + /** @file storage/perfschema/pfs_global.h Miscellaneous global dependencies (declarations). @@ -26,6 +29,18 @@ extern bool pfs_initialized; /** Total memory allocated by the performance schema, in bytes. */ extern ulonglong pfs_allocated_memory; +#if defined(HAVE_POSIX_MEMALIGN) || defined(HAVE_MEMALIGN) || defined(HAVE_ALIGNED_MALLOC) +#define PFS_ALIGNEMENT 64 +#define PFS_ALIGNED MY_ALIGNED(PFS_ALIGNEMENT) +#else +/* + Known platforms that do not provide aligned memory: + - MacOSX Darwin (osx10.5) + For these platforms, compile without the alignment optimization. +*/ +#define PFS_ALIGNED +#endif /* HAVE_POSIX_MEMALIGN || HAVE_MEMALIGN || HAVE_ALIGNED_MALLOC */ + void *pfs_malloc(size_t size, myf flags); /** |