From b69680acf77a01d442f2494678cef7779e01e07e Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 16 Dec 2018 16:44:52 -0500 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1420 --- MagickCore/memory.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MagickCore/memory.c b/MagickCore/memory.c index b6d225d95..52edf10c3 100644 --- a/MagickCore/memory.c +++ b/MagickCore/memory.c @@ -257,9 +257,7 @@ MagickExport void *AcquireAlignedMemory(const size_t count,const size_t quantum) memory=NULL; size=count*quantum; alignment=CACHE_LINE_SIZE; - if (size > (size_t) (GetMagickPageSize() >> 1)) - alignment=(size_t) GetMagickPageSize(); - extent=AlignedExtent(size,CACHE_LINE_SIZE); + extent=AlignedExtent(size,alignment); if ((size == 0) || (extent < size)) return((void *) NULL); #if defined(MAGICKCORE_HAVE_POSIX_MEMALIGN) -- 2.40.0