From e950708130aeae873a96df62c4ecf32b8adae317 Mon Sep 17 00:00:00 2001 From: nihui Date: Fri, 3 Jan 2025 10:35:49 +0800 Subject: [PATCH] Update allocator.h --- src/allocator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/allocator.h b/src/allocator.h index e3e987ed45a..35e5fc60946 100644 --- a/src/allocator.h +++ b/src/allocator.h @@ -38,13 +38,13 @@ namespace ncnn { #elif NCNN_AVX #define NCNN_MALLOC_ALIGN 32 #else -#define NCNN_MALLOC_ALIGN 16 +#define NCNN_MALLOC_ALIGN 128 #endif // we have some optimized kernels that may overread buffer a bit in loop // it is common to interleave next-loop data load with arithmetic instructions // allocating more bytes keeps us safe from SEGV_ACCERR failure -#define NCNN_MALLOC_OVERREAD 64 +#define NCNN_MALLOC_OVERREAD 512 // Aligns a pointer to the specified number of bytes // ptr Aligned pointer