From: Cristy Date: Sun, 16 Dec 2018 21:44:52 +0000 (-0500) Subject: https://github.com/ImageMagick/ImageMagick/issues/1420 X-Git-Tag: 7.0.8-17~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b69680acf77a01d442f2494678cef7779e01e07e;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/1420 --- 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)