From 2cc497634714cb1a4c1e4b9fcdcb366f4e41fd6a Mon Sep 17 00:00:00 2001 From: Hans Kristian Rosbach Date: Sat, 12 Sep 2020 22:55:02 +0200 Subject: [PATCH] Increase zng_alloc alignment to 64-bytes for non-MacOS platforms. --- zutil_p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zutil_p.h b/zutil_p.h index b39fc288..a5f2e525 100644 --- a/zutil_p.h +++ b/zutil_p.h @@ -11,14 +11,14 @@ # include #endif -/* Function to allocate 16-byte aligned memory */ +/* Function to allocate 16 or 64-byte aligned memory */ static inline void *zng_alloc(size_t size) { #if defined(_WIN32) - return (void *)_aligned_malloc(size, 16); + return (void *)_aligned_malloc(size, 64); #elif defined(__APPLE__) return (void *)malloc(size); /* MacOS always aligns to 16 bytes */ #else - return (void *)memalign(16, size); + return (void *)memalign(64, size); #endif } -- 2.47.3