From: Hans Kristian Rosbach Date: Sat, 12 Sep 2020 20:55:02 +0000 (+0200) Subject: Increase zng_alloc alignment to 64-bytes for non-MacOS platforms. X-Git-Tag: 1.9.9-b1~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2cc497634714cb1a4c1e4b9fcdcb366f4e41fd6a;p=thirdparty%2Fzlib-ng.git Increase zng_alloc alignment to 64-bytes for non-MacOS platforms. --- 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 }