]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Increase zng_alloc alignment to 64-bytes for non-MacOS platforms.
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Sat, 12 Sep 2020 20:55:02 +0000 (22:55 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 14 Sep 2020 10:04:30 +0000 (12:04 +0200)
zutil_p.h

index b39fc2881135d67bd0a1d8b536804283c68b4a13..a5f2e525d14beeb87c25eb4e1445fbf0ea21ff9d 100644 (file)
--- a/zutil_p.h
+++ b/zutil_p.h
 #  include <malloc.h>
 #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
 }