]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 4 Oct 2010 16:46:15 +0000 (16:46 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 4 Oct 2010 16:46:15 +0000 (16:46 +0000)
74 files changed:
ChangeLog
PerlMagick/Magick.xs
coders/dcm.c
coders/djvu.c
coders/gif.c
coders/jp2.c
coders/msl.c
coders/png.c
coders/svg.c
coders/vid.c
coders/xwd.c
magick/PreRvIcccm.c
magick/accelerate.c
magick/animate.c
magick/blob.c
magick/cache-view.c
magick/cache.c
magick/cipher.c
magick/coder.c
magick/color.c
magick/compress.c
magick/deprecate.c
magick/display.c
magick/draw.c
magick/effect.c
magick/exception.c
magick/fourier.c
magick/fx.c
magick/hashmap.c
magick/histogram.c
magick/image-view.c
magick/image.c
magick/locale.c
magick/log.c
magick/mac.c
magick/magic.c
magick/magick.c
magick/memory.c
magick/mime.c
magick/module.c
magick/montage.c
magick/nt-base.c
magick/nt-feature.c
magick/paint.c
magick/policy.c
magick/profile.c
magick/quantize.c
magick/quantum.c
magick/random.c
magick/registry.c
magick/resize.c
magick/segment.c
magick/shear.c
magick/signature.c
magick/splay-tree.c
magick/statistic.c
magick/stream.c
magick/string.c
magick/thread.c
magick/threshold.c
magick/timer.c
magick/token.c
magick/type.c
magick/utility.c
magick/vms.c
magick/xml-tree.c
magick/xwindow.c
wand/deprecate.c
wand/drawing-wand.c
wand/magick-image.c
wand/magick-wand.c
wand/pixel-iterator.c
wand/pixel-wand.c
wand/wand-view.c

index 8a7d0b745d1ac11ae3ed8998082ad6e34a336870..139f5871e26cfba4fe8008463b90bd61051bf54e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-03  6.6.4-9 Cristy  <quetzlzacatenango@image...>
+  * Fix memory assertion with --enable-embeddable (reference
+    http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=17201).
+
 2010-10-02  6.6.4-9 Anthony Thyssen <A.Thyssen@griffith...>
   * Added sqrt(2) bluring default for Gaussian Filter if used as a
     Cylindrical EWA filter.  This resulted in the last aliasing issue
index 122eca98d4a53108c0977dbe788e2c93ef468292..b90c0d72cd463940ef2bb9e420e9329189e5f432 100644 (file)
@@ -578,7 +578,7 @@ static struct PackageInfo *ClonePackageInfo(struct PackageInfo *info,
   struct PackageInfo
     *clone_info;
 
-  clone_info=(struct PackageInfo *) AcquireAlignedMemory(1,sizeof(*clone_info));
+  clone_info=(struct PackageInfo *) AcquireQuantumMemory(1,sizeof(*clone_info));
   if (clone_info == (struct PackageInfo *) NULL)
     {
       ThrowPerlException(exception,ResourceLimitError,
index 295e41ebbb0faf589db33a1bbad13565df3472da..40ab862c90b5359f7495fdbf5922faeefc7786c4 100644 (file)
@@ -2882,7 +2882,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
   /*
     Read DCM preamble.
   */
-  stream_info=(DCMStreamInfo *) AcquireAlignedMemory(1,sizeof(*stream_info));
+  stream_info=(DCMStreamInfo *) AcquireQuantumMemory(1,sizeof(*stream_info));
   if (stream_info == (DCMStreamInfo *) NULL)
     ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(stream_info,0,sizeof(*stream_info));
index 3e3dac2dae1795a5de0b1dc4fde883723cec29ac..923762f4d9fa8bfeb261ba7700b671d55954913f 100644 (file)
@@ -801,7 +801,7 @@ static Image *ReadDJVUImage(const ImageInfo *image_info,
   /*
    * Allocate a LoadContext structure.
    */
-  lc = (LoadContext *) AcquireAlignedMemory(1,sizeof(*lc));
+  lc = (LoadContext *) AcquireQuantumMemory(1,sizeof(*lc));
   if (lc == NULL)
     ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
 
index d000033f852c1aaf575f01b666e890cf7b7b5370..1601f14b30c33625dde7b613713aa1b804e8ac70 100644 (file)
@@ -202,7 +202,7 @@ static LZWInfo *AcquireLZWInfo(Image *image,const size_t data_size)
   size_t
     one;
 
-  lzw_info=(LZWInfo *) AcquireAlignedMemory(1,sizeof(*lzw_info));
+  lzw_info=(LZWInfo *) AcquireQuantumMemory(1,sizeof(*lzw_info));
   if (lzw_info == (LZWInfo *) NULL)
     return((LZWInfo *) NULL);
   (void) ResetMagickMemory(lzw_info,0,sizeof(*lzw_info));
@@ -234,7 +234,7 @@ static LZWInfo *AcquireLZWInfo(Image *image,const size_t data_size)
   lzw_info->code_info.bit=8*lzw_info->code_info.count;
   lzw_info->code_info.eof=MagickFalse;
   lzw_info->genesis=MagickTrue;
-  lzw_info->stack=(LZWStack *) AcquireAlignedMemory(1,sizeof(*lzw_info->stack));
+  lzw_info->stack=(LZWStack *) AcquireQuantumMemory(1,sizeof(*lzw_info->stack));
   if (lzw_info->stack == (LZWStack *) NULL)
     {
       lzw_info=RelinquishLZWInfo(lzw_info);
index 5e3afa311fc24a0264820b52bbbdb3d9225a54ae..6c00cbb024f003fe900ff57d860ce96f68e9f402 100644 (file)
@@ -260,7 +260,8 @@ static int BlobClose(jas_stream_obj_t *object)
 
   source=(StreamManager *) object;
   (void) CloseBlob(source->image);
-  source=(StreamManager *) RelinquishMagickMemory(source);
+  free(source);
+  source=(StreamManager *) NULL;
   return(0);
 }
 
index 69542c608322906dcae780433746995fd5dcdf80..3be559df65e7fb6dd6a72f539d4dd276feada4fa 100644 (file)
@@ -7597,7 +7597,7 @@ static MagickBooleanType ProcessMSLScript(const ImageInfo *image_info,Image **im
   msl_info.draw_info=(DrawInfo **) AcquireMagickMemory(
     sizeof(*msl_info.draw_info));
   /* top of the stack is the MSL file itself */
-  msl_info.image=(Image **) AcquireAlignedMemory(1,sizeof(*msl_info.image));
+  msl_info.image=(Image **) AcquireQuantumMemory(1,sizeof(*msl_info.image));
   msl_info.attributes=(Image **) AcquireMagickMemory(
     sizeof(*msl_info.attributes));
   msl_info.group_info=(MSLGroupInfo *) AcquireMagickMemory(
index 30473b07687395289656234d3b6d07214c0b1a94..0fae03082aa3425e70e1364e0ce3f6665594746f 100644 (file)
@@ -3014,7 +3014,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
             create a new object buffer.
           */
           mng_info->ob[object_id]=(MngBuffer *)
-            AcquireAlignedMemory(1,sizeof(MngBuffer));
+            AcquireQuantumMemory(1,sizeof(MngBuffer));
           if (mng_info->ob[object_id] != (MngBuffer *) NULL)
             {
               mng_info->ob[object_id]->image=(Image *) NULL;
@@ -3146,7 +3146,7 @@ static Image *ReadPNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
     Allocate a MngInfo structure.
   */
   have_mng_structure=MagickFalse;
-  mng_info=(MngInfo *) AcquireAlignedMemory(1,sizeof(MngInfo));
+  mng_info=(MngInfo *) AcquireQuantumMemory(1,sizeof(MngInfo));
   if (mng_info == (MngInfo *) NULL)
     ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
   /*
@@ -3443,7 +3443,7 @@ static Image *ReadOneJNGImage(MngInfo *mng_info,
                open alpha_blob, attached to alpha_image
         */
 
-        color_image_info=(ImageInfo *)AcquireAlignedMemory(1,sizeof(ImageInfo));
+        color_image_info=(ImageInfo *)AcquireQuantumMemory(1,sizeof(ImageInfo));
         if (color_image_info == (ImageInfo *) NULL)
           ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
         GetImageInfo(color_image_info);
@@ -3463,7 +3463,7 @@ static Image *ReadOneJNGImage(MngInfo *mng_info,
         if ((image_info->ping == MagickFalse) && (jng_color_type >= 12))
           {
             alpha_image_info=(ImageInfo *)
-              AcquireAlignedMemory(1,sizeof(ImageInfo));
+              AcquireQuantumMemory(1,sizeof(ImageInfo));
             if (alpha_image_info == (ImageInfo *) NULL)
               ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
             GetImageInfo(alpha_image_info);
@@ -3912,7 +3912,7 @@ static Image *ReadJNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
     Allocate a MngInfo structure.
   */
   have_mng_structure=MagickFalse;
-  mng_info=(MngInfo *) AcquireAlignedMemory(1,sizeof(*mng_info));
+  mng_info=(MngInfo *) AcquireQuantumMemory(1,sizeof(*mng_info));
   if (mng_info == (MngInfo *) NULL)
     ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
   /*
@@ -4087,7 +4087,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
   /*
     Allocate a MngInfo structure.
   */
-  mng_info=(MngInfo *) AcquireAlignedMemory(1,sizeof(MngInfo));
+  mng_info=(MngInfo *) AcquireQuantumMemory(1,sizeof(MngInfo));
   if (mng_info == (MngInfo *) NULL)
     ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
   /*
@@ -8243,7 +8243,7 @@ static MagickBooleanType WritePNGImage(const ImageInfo *image_info,
     Allocate a MngInfo structure.
   */
   have_mng_structure=MagickFalse;
-  mng_info=(MngInfo *) AcquireAlignedMemory(1,sizeof(MngInfo));
+  mng_info=(MngInfo *) AcquireQuantumMemory(1,sizeof(MngInfo));
   if (mng_info == (MngInfo *) NULL)
     ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
   /*
@@ -8893,7 +8893,7 @@ static MagickBooleanType WriteJNGImage(const ImageInfo *image_info,Image *image)
     Allocate a MngInfo structure.
   */
   have_mng_structure=MagickFalse;
-  mng_info=(MngInfo *) AcquireAlignedMemory(1,sizeof(MngInfo));
+  mng_info=(MngInfo *) AcquireQuantumMemory(1,sizeof(MngInfo));
   if (mng_info == (MngInfo *) NULL)
     ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
   /*
@@ -8989,7 +8989,7 @@ static MagickBooleanType WriteMNGImage(const ImageInfo *image_info,Image *image)
     Allocate a MngInfo structure.
   */
   have_mng_structure=MagickFalse;
-  mng_info=(MngInfo *) AcquireAlignedMemory(1,sizeof(MngInfo));
+  mng_info=(MngInfo *) AcquireQuantumMemory(1,sizeof(MngInfo));
   if (mng_info == (MngInfo *) NULL)
     ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
   /*
index 784d97c0ce3be9760bf362dffd2d79d79c4e1563..6ada127c16866ce1a51c30e3588a36fb5d671b76 100644 (file)
@@ -260,12 +260,12 @@ static SVGInfo *AcquireSVGInfo(void)
   SVGInfo
     *svg_info;
 
-  svg_info=(SVGInfo *) AcquireAlignedMemory(1,sizeof(*svg_info));
+  svg_info=(SVGInfo *) AcquireQuantumMemory(1,sizeof(*svg_info));
   if (svg_info == (SVGInfo *) NULL)
     return((SVGInfo *) NULL);
   (void) ResetMagickMemory(svg_info,0,sizeof(*svg_info));
   svg_info->text=AcquireString("");
-  svg_info->scale=(double *) AcquireAlignedMemory(1,sizeof(*svg_info->scale));
+  svg_info->scale=(double *) AcquireQuantumMemory(1,sizeof(*svg_info->scale));
   if (svg_info->scale == (double *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   GetAffineMatrix(&svg_info->affine);
index 40eab67f943093667eddd97262e85911942eb5eb..60bbbef2422971d7861897a9e374b44d222ee0b7 100644 (file)
@@ -139,7 +139,7 @@ static Image *ReadVIDImage(const ImageInfo *image_info,ExceptionInfo *exception)
   assert(exception != (ExceptionInfo *) NULL);
   assert(exception->signature == MagickSignature);
   image=AcquireImage(image_info);
-  filelist=(char **) AcquireAlignedMemory(1,sizeof(*filelist));
+  filelist=(char **) AcquireQuantumMemory(1,sizeof(*filelist));
   if (filelist == (char **) NULL)
     ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
   filelist[0]=ConstantString(image_info->filename);
index 690f7ef87879f9dd55a6365da6ee807af6e7dd69..e8d8b35ad47d60f177c95219fee2076ecd62e714 100644 (file)
@@ -256,7 +256,7 @@ static Image *ReadXWDImage(const ImageInfo *image_info,ExceptionInfo *exception)
   /*
     Initialize the X image.
   */
-  ximage=(XImage *) AcquireAlignedMemory(1,sizeof(*ximage));
+  ximage=(XImage *) AcquireQuantumMemory(1,sizeof(*ximage));
   if (ximage == (XImage *) NULL)
     ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
   ximage->depth=(int) header.pixmap_depth;
index 5f714ccce495eab2b247934824ce773a8ae6abc8..e16247ba14eae80430c4b3c8523fa75e9a01e651 100644 (file)
@@ -127,17 +127,17 @@ Bool XSupportsLocale()
 */
 XClassHint *XAllocClassHint)
 {
-  return((XClassHint *) AcquireAlignedMemory(1,sizeof(XClassHint)));
+  return((XClassHint *) AcquireQuantumMemory(1,sizeof(XClassHint)));
 }
 
 XIconSize *XAllocIconSize)
 {
-  return((XIconSize *) AcquireAlignedMemory(1,sizeof(XIconSize)));
+  return((XIconSize *) AcquireQuantumMemory(1,sizeof(XIconSize)));
 }
 
 XSizeHints *XAllocSizeHints)
 {
-  return((XSizeHints *) AcquireAlignedMemory(1,sizeof(XSizeHints)));
+  return((XSizeHints *) AcquireQuantumMemory(1,sizeof(XSizeHints)));
 }
 
 Status XReconfigureWMWindow(Display *display,Window window,int screen_number,
@@ -148,12 +148,12 @@ Status XReconfigureWMWindow(Display *display,Window window,int screen_number,
 
 XStandardColormap *XAllocStandardColormap)
 {
-  return((XStandardColormap *) AcquireAlignedMemory(1,sizeof(XStandardColormap)));
+  return((XStandardColormap *) AcquireQuantumMemory(1,sizeof(XStandardColormap)));
 }
 
 XWMHints *XAllocWMHints)
 {
-  return((XWMHints *) AcquireAlignedMemory(1,sizeof(XWMHints)));
+  return((XWMHints *) AcquireQuantumMemory(1,sizeof(XWMHints)));
 }
 
 Status XGetGCValues(Display *display,GC gc,size_t mask,
index 2e627431218147420b9521f258c595fdc426fcfe..5c83685ccb5f9c958e2e031a12acc42ac14ea755 100644 (file)
@@ -477,7 +477,7 @@ static ConvolveInfo *GetConvolveInfo(const Image *image,const char *name,
   /*
     Create OpenCL info.
   */
-  convolve_info=(ConvolveInfo *) AcquireAlignedMemory(1,sizeof(*convolve_info));
+  convolve_info=(ConvolveInfo *) AcquireQuantumMemory(1,sizeof(*convolve_info));
   if (convolve_info == (ConvolveInfo *) NULL)
     {
       (void) ThrowMagickException(exception,GetMagickModule(),
index 8b66ec5a294d5b85357f8dfe97893dbc2eefc829..8249fc6957f875125a991b724e046db49dd1cf81 100644 (file)
@@ -414,7 +414,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       /*
         Expand the filenames.
       */
-      filelist=(char **) AcquireAlignedMemory(1,sizeof(char *));
+      filelist=(char **) AcquireQuantumMemory(1,sizeof(char *));
       if (filelist == (char **) NULL)
         {
           ThrowXWindowException(ResourceLimitError,"MemoryAllocationFailed",
index 956c79502e95f2ea3a60a5f21ee547048ce84d7c..562853333f0d02175d97805c851044085996201b 100644 (file)
@@ -417,7 +417,7 @@ MagickExport BlobInfo *CloneBlobInfo(const BlobInfo *blob_info)
   BlobInfo
     *clone_info;
 
-  clone_info=(BlobInfo *) AcquireAlignedMemory(1,sizeof(*clone_info));
+  clone_info=(BlobInfo *) AcquireQuantumMemory(1,sizeof(*clone_info));
   if (clone_info == (BlobInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   GetBlobInfo(clone_info);
index 4982efece53b2e47665b07ce0f1e3acdce06628f..f4cc5f2e7db456b1a34a4e8054aecab9b5fa0625 100644 (file)
@@ -112,7 +112,7 @@ MagickExport CacheView *AcquireCacheView(const Image *image)
   assert(image->signature == MagickSignature);
   if (image->debug != MagickFalse)
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
-  cache_view=(CacheView *) AcquireAlignedMemory(1,sizeof(*cache_view));
+  cache_view=(CacheView *) AcquireQuantumMemory(1,sizeof(*cache_view));
   if (cache_view == (CacheView *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(cache_view,0,sizeof(*cache_view));
@@ -159,7 +159,7 @@ MagickExport CacheView *CloneCacheView(const CacheView *cache_view)
   if (cache_view->debug != MagickFalse)
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
       cache_view->image->filename);
-  clone_view=(CacheView *) AcquireAlignedMemory(1,sizeof(*clone_view));
+  clone_view=(CacheView *) AcquireQuantumMemory(1,sizeof(*clone_view));
   if (clone_view == (CacheView *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(clone_view,0,sizeof(*clone_view));
@@ -207,7 +207,7 @@ MagickExport CacheView *DestroyCacheView(CacheView *cache_view)
       cache_view->number_threads);
   cache_view->image=DestroyImage(cache_view->image);
   cache_view->signature=(~MagickSignature);
-  cache_view=(CacheView *) RelinquishAlignedMemory(cache_view);
+  cache_view=(CacheView *) RelinquishMagickMemory(cache_view);
   return(cache_view);
 }
 \f
index 54a75144c02bbdf1c7bc07808b19afb2e26cb459..e24de0cdb473e3117462283815cd5ce1834dd7e0 100644 (file)
@@ -185,7 +185,7 @@ MagickExport Cache AcquirePixelCache(const size_t number_threads)
   CacheInfo
     *cache_info;
 
-  cache_info=(CacheInfo *) AcquireAlignedMemory(1,sizeof(*cache_info));
+  cache_info=(CacheInfo *) AcquireQuantumMemory(1,sizeof(*cache_info));
   if (cache_info == (CacheInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(cache_info,0,sizeof(*cache_info));
@@ -254,7 +254,7 @@ MagickExport NexusInfo **AcquirePixelCacheNexus(const size_t number_threads)
   register ssize_t
     i;
 
-  nexus_info=(NexusInfo **) AcquireAlignedMemory(number_threads,
+  nexus_info=(NexusInfo **) AcquireQuantumMemory(number_threads,
     sizeof(*nexus_info));
   if (nexus_info == (NexusInfo **) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
@@ -1523,7 +1523,7 @@ MagickExport Cache DestroyPixelCache(Cache cache)
   if (cache_info->semaphore != (SemaphoreInfo *) NULL)
     DestroySemaphoreInfo(&cache_info->semaphore);
   cache_info->signature=(~MagickSignature);
-  cache_info=(CacheInfo *) RelinquishAlignedMemory(cache_info);
+  cache_info=(CacheInfo *) RelinquishMagickMemory(cache_info);
   cache=(Cache) NULL;
   return(cache);
 }
@@ -1581,7 +1581,7 @@ MagickExport NexusInfo **DestroyPixelCacheNexus(NexusInfo **nexus_info,
     nexus_info[i]->signature=(~MagickSignature);
     nexus_info[i]=(NexusInfo *) RelinquishAlignedMemory(nexus_info[i]);
   }
-  nexus_info=(NexusInfo **) RelinquishAlignedMemory(nexus_info);
+  nexus_info=(NexusInfo **) RelinquishMagickMemory(nexus_info);
   return(nexus_info);
 }
 \f
index bc01b2d72a1813a6b651d850d291251958c843d7..c5418e6f80a5e558b77006c87e0a1846d890b937 100644 (file)
@@ -190,7 +190,7 @@ static AESInfo *AcquireAESInfo(void)
   AESInfo
     *aes_info;
 
-  aes_info=(AESInfo *) AcquireAlignedMemory(1,sizeof(*aes_info));
+  aes_info=(AESInfo *) AcquireQuantumMemory(1,sizeof(*aes_info));
   if (aes_info == (AESInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(aes_info,0,sizeof(*aes_info));
index cce0356fa07d6d407bcc59e72df1af85823545bf..c8f74d2f1589b92b80ece74b6dbaf96c7ae62103 100644 (file)
@@ -779,7 +779,7 @@ static MagickBooleanType LoadCoderList(const char *xml,const char *filename,
         /*
           Coder element.
         */
-        coder_info=(CoderInfo *) AcquireAlignedMemory(1,sizeof(*coder_info));
+        coder_info=(CoderInfo *) AcquireQuantumMemory(1,sizeof(*coder_info));
         if (coder_info == (CoderInfo *) NULL)
           ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
         (void) ResetMagickMemory(coder_info,0,sizeof(*coder_info));
@@ -910,7 +910,7 @@ static MagickBooleanType LoadCoderLists(const char *filename,
       *p;
 
     p=CoderMap+i;
-    coder_info=(CoderInfo *) AcquireAlignedMemory(1,sizeof(*coder_info));
+    coder_info=(CoderInfo *) AcquireQuantumMemory(1,sizeof(*coder_info));
     if (coder_info == (CoderInfo *) NULL)
       {
         (void) ThrowMagickException(exception,GetMagickModule(),
index f1c051005f74a7948be8f7d7ad0431b29d790de2..eb2df6a33a55feee93ebc10374c3b611119af6f4 100644 (file)
@@ -2075,7 +2075,7 @@ static MagickBooleanType LoadColorList(const char *xml,const char *filename,
         /*
           Color element.
         */
-        color_info=(ColorInfo *) AcquireAlignedMemory(1,sizeof(*color_info));
+        color_info=(ColorInfo *) AcquireQuantumMemory(1,sizeof(*color_info));
         if (color_info == (ColorInfo *) NULL)
           ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
         (void) ResetMagickMemory(color_info,0,sizeof(*color_info));
@@ -2219,7 +2219,7 @@ static MagickBooleanType LoadColorLists(const char *filename,
       *p;
 
     p=ColorMap+i;
-    color_info=(ColorInfo *) AcquireAlignedMemory(1,sizeof(*color_info));
+    color_info=(ColorInfo *) AcquireQuantumMemory(1,sizeof(*color_info));
     if (color_info == (ColorInfo *) NULL)
       {
         (void) ThrowMagickException(exception,GetMagickModule(),
index c40605e298c580ed9f53893d740aa605d383bcbc..6f0c8a629b62f57d5b870a54127278886e6e031a 100644 (file)
@@ -274,7 +274,7 @@ MagickExport void Ascii85Initialize(Image *image)
     Allocate image structure.
   */
   if (image->ascii85 == (Ascii85Info *) NULL)
-    image->ascii85=(Ascii85Info *) AcquireAlignedMemory(1,sizeof(*image->ascii85));
+    image->ascii85=(Ascii85Info *) AcquireQuantumMemory(1,sizeof(*image->ascii85));
   if (image->ascii85 == (Ascii85Info *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(image->ascii85,0,sizeof(*image->ascii85));
index 2bf9cce9fbad39dd504f61cda348d1f874d07531..2ae4dc5041b9a72db0446a39c2dcd45fa92bd806 100644 (file)
@@ -2512,7 +2512,7 @@ MagickExport const ImageAttribute *GetImageAttribute(const Image *image,
       if (attribute != (const ImageAttribute *) NULL)
         return(attribute);
     }
-  attribute=(ImageAttribute *) AcquireAlignedMemory(1,sizeof(*attribute));
+  attribute=(ImageAttribute *) AcquireQuantumMemory(1,sizeof(*attribute));
   if (attribute == (ImageAttribute *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(attribute,0,sizeof(*attribute));
index 4498c2899db19bb628aa5e03cb2a0ce2dfdb255f..1f55eff98089375aa3098f945261f05562262f0c 100644 (file)
@@ -2234,7 +2234,7 @@ static MagickBooleanType XAnnotateEditImage(Display *display,
   /*
     Initialize annotate structure.
   */
-  annotate_info=(XAnnotateInfo *) AcquireAlignedMemory(1,sizeof(*annotate_info));
+  annotate_info=(XAnnotateInfo *) AcquireQuantumMemory(1,sizeof(*annotate_info));
   if (annotate_info == (XAnnotateInfo *) NULL)
     return(MagickFalse);
   XGetAnnotateInfo(annotate_info);
@@ -13435,7 +13435,7 @@ static Image *XVisualDirectoryImage(Display *display,
   /*
     Expand the filenames.
   */
-  filelist=(char **) AcquireAlignedMemory(1,sizeof(*filelist));
+  filelist=(char **) AcquireQuantumMemory(1,sizeof(*filelist));
   if (filelist == (char **) NULL)
     {
       ThrowXWindowFatalException(ResourceLimitError,"MemoryAllocationFailed",
index 6b3827e54e732e2d9446a6b71b47274a2bb853d0..61d22bb0dc8134e1186bc6777f97b4deab55994f 100644 (file)
@@ -197,7 +197,7 @@ MagickExport DrawInfo *AcquireDrawInfo(void)
   DrawInfo
     *draw_info;
 
-  draw_info=(DrawInfo *) AcquireAlignedMemory(1,sizeof(*draw_info));
+  draw_info=(DrawInfo *) AcquireQuantumMemory(1,sizeof(*draw_info));
   if (draw_info == (DrawInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   GetDrawInfo((ImageInfo *) NULL,draw_info);
@@ -237,7 +237,7 @@ MagickExport DrawInfo *CloneDrawInfo(const ImageInfo *image_info,
   DrawInfo
     *clone_info;
 
-  clone_info=(DrawInfo *) AcquireAlignedMemory(1,sizeof(*clone_info));
+  clone_info=(DrawInfo *) AcquireQuantumMemory(1,sizeof(*clone_info));
   if (clone_info == (DrawInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   GetDrawInfo(image_info,clone_info);
@@ -481,7 +481,7 @@ static PolygonInfo *ConvertPathToPolygon(
   /*
     Convert a path to the more efficient sorted rendering form.
   */
-  polygon_info=(PolygonInfo *) AcquireAlignedMemory(1,sizeof(*polygon_info));
+  polygon_info=(PolygonInfo *) AcquireQuantumMemory(1,sizeof(*polygon_info));
   if (polygon_info == (PolygonInfo *) NULL)
     return((PolygonInfo *) NULL);
   number_edges=16;
@@ -1767,7 +1767,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
   /*
     Allocate primitive info memory.
   */
-  graphic_context=(DrawInfo **) AcquireAlignedMemory(1,
+  graphic_context=(DrawInfo **) AcquireQuantumMemory(1,
     sizeof(*graphic_context));
   if (graphic_context == (DrawInfo **) NULL)
     {
@@ -3586,7 +3586,7 @@ static PolygonInfo **DestroyPolygonThreadSet(PolygonInfo **polygon_info)
   for (i=0; i < (ssize_t) GetOpenMPMaximumThreads(); i++)
     if (polygon_info[i] != (PolygonInfo *) NULL)
       polygon_info[i]=DestroyPolygonInfo(polygon_info[i]);
-  polygon_info=(PolygonInfo **) RelinquishAlignedMemory(polygon_info);
+  polygon_info=(PolygonInfo **) RelinquishMagickMemory(polygon_info);
   return(polygon_info);
 }
 
@@ -3606,7 +3606,7 @@ static PolygonInfo **AcquirePolygonThreadSet(const DrawInfo *draw_info,
     number_threads;
 
   number_threads=GetOpenMPMaximumThreads();
-  polygon_info=(PolygonInfo **) AcquireAlignedMemory(number_threads,
+  polygon_info=(PolygonInfo **) AcquireQuantumMemory(number_threads,
     sizeof(*polygon_info));
   if (polygon_info == (PolygonInfo **) NULL)
     return((PolygonInfo **) NULL);
index 520ca1a5fd724e17fda9d434bc5f4b03a3d54a73..299245370e8dab4f08be2a87d6ee4996beb767b9 100644 (file)
@@ -1663,7 +1663,7 @@ static Quantum **DestroyPixelThreadSet(Quantum **pixels)
   for (i=0; i < (ssize_t) GetOpenMPMaximumThreads(); i++)
     if (pixels[i] != (Quantum *) NULL)
       pixels[i]=(Quantum *) RelinquishMagickMemory(pixels[i]);
-  pixels=(Quantum **) RelinquishAlignedMemory(pixels);
+  pixels=(Quantum **) RelinquishMagickMemory(pixels);
   return(pixels);
 }
 
@@ -1679,7 +1679,7 @@ static Quantum **AcquirePixelThreadSet(const size_t count)
     number_threads;
 
   number_threads=GetOpenMPMaximumThreads();
-  pixels=(Quantum **) AcquireAlignedMemory(number_threads,sizeof(*pixels));
+  pixels=(Quantum **) AcquireQuantumMemory(number_threads,sizeof(*pixels));
   if (pixels == (Quantum **) NULL)
     return((Quantum **) NULL);
   (void) ResetMagickMemory(pixels,0,number_threads*sizeof(*pixels));
@@ -2632,7 +2632,7 @@ static MedianPixelList *DestroyMedianPixelList(MedianPixelList *pixel_list)
     if (pixel_list->lists[i].nodes != (MedianListNode *) NULL)
       pixel_list->lists[i].nodes=(MedianListNode *) RelinquishMagickMemory(
         pixel_list->lists[i].nodes);
-  pixel_list=(MedianPixelList *) RelinquishAlignedMemory(pixel_list);
+  pixel_list=(MedianPixelList *) RelinquishMagickMemory(pixel_list);
   return(pixel_list);
 }
 
@@ -2646,7 +2646,7 @@ static MedianPixelList **DestroyMedianPixelListThreadSet(
   for (i=0; i < (ssize_t) GetOpenMPMaximumThreads(); i++)
     if (pixel_list[i] != (MedianPixelList *) NULL)
       pixel_list[i]=DestroyMedianPixelList(pixel_list[i]);
-  pixel_list=(MedianPixelList **) RelinquishAlignedMemory(pixel_list);
+  pixel_list=(MedianPixelList **) RelinquishMagickMemory(pixel_list);
   return(pixel_list);
 }
 
@@ -2658,7 +2658,7 @@ static MedianPixelList *AcquireMedianPixelList(const size_t width)
   register ssize_t
     i;
 
-  pixel_list=(MedianPixelList *) AcquireAlignedMemory(1,sizeof(*pixel_list));
+  pixel_list=(MedianPixelList *) AcquireQuantumMemory(1,sizeof(*pixel_list));
   if (pixel_list == (MedianPixelList *) NULL)
     return(pixel_list);
   (void) ResetMagickMemory((void *) pixel_list,0,sizeof(*pixel_list));
@@ -2688,7 +2688,7 @@ static MedianPixelList **AcquireMedianPixelListThreadSet(const size_t width)
     number_threads;
 
   number_threads=GetOpenMPMaximumThreads();
-  pixel_list=(MedianPixelList **) AcquireAlignedMemory(number_threads,
+  pixel_list=(MedianPixelList **) AcquireQuantumMemory(number_threads,
     sizeof(*pixel_list));
   if (pixel_list == (MedianPixelList **) NULL)
     return((MedianPixelList **) NULL);
index 4ed1857ed22d3d888d76baae78dc7b5ddd8dce82..6eb925a7f5c78f598f2894b513d0f509a8b85349 100644 (file)
@@ -103,7 +103,7 @@ MagickExport ExceptionInfo *AcquireExceptionInfo(void)
   ExceptionInfo
     *exception;
 
-  exception=(ExceptionInfo *) AcquireAlignedMemory(1,sizeof(*exception));
+  exception=(ExceptionInfo *) AcquireQuantumMemory(1,sizeof(*exception));
   if (exception == (ExceptionInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   GetExceptionInfo(exception);
@@ -881,7 +881,7 @@ MagickExport MagickBooleanType ThrowException(ExceptionInfo *exception,
       (LocaleCompare(exception->reason,reason) == 0) &&
       (LocaleCompare(exception->description,description) == 0))
     return(MagickTrue);
-  p=(ExceptionInfo *) AcquireAlignedMemory(1,sizeof(*p));
+  p=(ExceptionInfo *) AcquireQuantumMemory(1,sizeof(*p));
   if (p == (ExceptionInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(p,0,sizeof(*p));
index b6cab9c385719f1224b1b8f527f782cc2943c274..8e7b21bc901cf270284ad10815e10d90a7633c37 100644 (file)
@@ -489,7 +489,7 @@ static MagickBooleanType ForwardFourierTransform(FourierInfo *fourier_info,
     }
   }
   image_view=DestroyCacheView(image_view);
-  fourier=(fftw_complex *) AcquireAlignedMemory((size_t) fourier_info->height,
+  fourier=(fftw_complex *) AcquireQuantumMemory((size_t) fourier_info->height,
     fourier_info->center*sizeof(*fourier));
   if (fourier == (fftw_complex *) NULL)
     {
@@ -542,7 +542,7 @@ static MagickBooleanType ForwardFourierTransform(FourierInfo *fourier_info,
         phase[i]=cimag(fourier[i]);
         i++;
       }
-  fourier=(fftw_complex *) RelinquishAlignedMemory(fourier);
+  fourier=(fftw_complex *) RelinquishMagickMemory(fourier);
   return(MagickTrue);
 }
 
@@ -594,7 +594,7 @@ static MagickBooleanType ForwardFourierTransformChannel(const Image *image,
       magnitude=(double *) RelinquishMagickMemory(magnitude);
       return(MagickFalse);
     }
-  fourier=(fftw_complex *) AcquireAlignedMemory((size_t) fourier_info.height,
+  fourier=(fftw_complex *) AcquireQuantumMemory((size_t) fourier_info.height,
     fourier_info.center*sizeof(*fourier));
   if (fourier == (fftw_complex *) NULL)
     {
@@ -608,7 +608,7 @@ static MagickBooleanType ForwardFourierTransformChannel(const Image *image,
   if (status != MagickFalse)
     status=ForwardFourier(&fourier_info,fourier_image,magnitude,phase,
       exception);
-  fourier=(fftw_complex *) RelinquishAlignedMemory(fourier);
+  fourier=(fftw_complex *) RelinquishMagickMemory(fourier);
   phase=(double *) RelinquishMagickMemory(phase);
   magnitude=(double *) RelinquishMagickMemory(magnitude);
   return(status);
@@ -1173,7 +1173,7 @@ static MagickBooleanType InverseFourierTransformChannel(
       magnitude=(double *) RelinquishMagickMemory(magnitude);
       return(MagickFalse);
     }
-  fourier=(fftw_complex *) AcquireAlignedMemory((size_t) fourier_info.height,
+  fourier=(fftw_complex *) AcquireQuantumMemory((size_t) fourier_info.height,
     fourier_info.center*sizeof(*fourier));
   if (fourier == (fftw_complex *) NULL)
     {
@@ -1189,7 +1189,7 @@ static MagickBooleanType InverseFourierTransformChannel(
   if (status != MagickFalse)
     status=InverseFourierTransform(&fourier_info,fourier,fourier_image,
       exception);
-  fourier=(fftw_complex *) RelinquishAlignedMemory(fourier);
+  fourier=(fftw_complex *) RelinquishMagickMemory(fourier);
   phase=(double *) RelinquishMagickMemory(phase);
   magnitude=(double *) RelinquishMagickMemory(magnitude);
   return(status);
index a47060656df339089c5ff043a720d81ab816a1fc..5c365f4ccde57bd3d0cab13be41550e89e44967c 100644 (file)
@@ -162,7 +162,7 @@ MagickExport FxInfo *AcquireFxInfo(const Image *image,const char *expression)
   register ssize_t
     i;
 
-  fx_info=(FxInfo *) AcquireAlignedMemory(1,sizeof(*fx_info));
+  fx_info=(FxInfo *) AcquireQuantumMemory(1,sizeof(*fx_info));
   if (fx_info == (FxInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(fx_info,0,sizeof(*fx_info));
@@ -2852,7 +2852,7 @@ static FxInfo **DestroyFxThreadSet(FxInfo **fx_info)
   for (i=0; i < (ssize_t) GetOpenMPMaximumThreads(); i++)
     if (fx_info[i] != (FxInfo *) NULL)
       fx_info[i]=DestroyFxInfo(fx_info[i]);
-  fx_info=(FxInfo **) RelinquishAlignedMemory(fx_info);
+  fx_info=(FxInfo **) RelinquishMagickMemory(fx_info);
   return(fx_info);
 }
 
@@ -2875,7 +2875,7 @@ static FxInfo **AcquireFxThreadSet(const Image *image,const char *expression,
     number_threads;
 
   number_threads=GetOpenMPMaximumThreads();
-  fx_info=(FxInfo **) AcquireAlignedMemory(number_threads,sizeof(*fx_info));
+  fx_info=(FxInfo **) AcquireQuantumMemory(number_threads,sizeof(*fx_info));
   if (fx_info == (FxInfo **) NULL)
     return((FxInfo **) NULL);
   (void) ResetMagickMemory(fx_info,0,number_threads*sizeof(*fx_info));
index bd5837ea27b3dd4ddaa7b13872d20f388191940c..d6eca49d40890a61ce8af337fc17dff37256ffa9 100644 (file)
@@ -165,7 +165,7 @@ MagickExport MagickBooleanType AppendValueToLinkedList(
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
   if (list_info->elements == list_info->capacity)
     return(MagickFalse);
-  next=(ElementInfo *) AcquireAlignedMemory(1,sizeof(*next));
+  next=(ElementInfo *) AcquireQuantumMemory(1,sizeof(*next));
   if (next == (ElementInfo *) NULL)
     return(MagickFalse);
   next->value=(void *) value;
@@ -1035,7 +1035,7 @@ MagickExport MagickBooleanType InsertValueInLinkedList(
   if ((index > list_info->elements) ||
       (list_info->elements == list_info->capacity))
     return(MagickFalse);
-  next=(ElementInfo *) AcquireAlignedMemory(1,sizeof(*next));
+  next=(ElementInfo *) AcquireQuantumMemory(1,sizeof(*next));
   if (next == (ElementInfo *) NULL)
     return(MagickFalse);
   next->value=(void *) value;
@@ -1142,7 +1142,7 @@ MagickExport MagickBooleanType InsertValueInSortedLinkedList(
     return(MagickFalse);
   if (list_info->elements == list_info->capacity)
     return(MagickFalse);
-  next=(ElementInfo *) AcquireAlignedMemory(1,sizeof(*next));
+  next=(ElementInfo *) AcquireQuantumMemory(1,sizeof(*next));
   if (next == (ElementInfo *) NULL)
     return(MagickFalse);
   next->value=(void *) value;
@@ -1350,7 +1350,7 @@ MagickExport HashmapInfo *NewHashmap(const size_t capacity,
   HashmapInfo
     *hashmap_info;
 
-  hashmap_info=(HashmapInfo *) AcquireAlignedMemory(1,sizeof(*hashmap_info));
+  hashmap_info=(HashmapInfo *) AcquireQuantumMemory(1,sizeof(*hashmap_info));
   if (hashmap_info == (HashmapInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(hashmap_info,0,sizeof(*hashmap_info));
@@ -1406,7 +1406,7 @@ MagickExport LinkedListInfo *NewLinkedList(const size_t capacity)
   LinkedListInfo
     *list_info;
 
-  list_info=(LinkedListInfo *) AcquireAlignedMemory(1,sizeof(*list_info));
+  list_info=(LinkedListInfo *) AcquireQuantumMemory(1,sizeof(*list_info));
   if (list_info == (LinkedListInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(list_info,0,sizeof(*list_info));
@@ -1551,7 +1551,7 @@ MagickExport MagickBooleanType PutEntryInHashmap(HashmapInfo *hashmap_info,
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
   if ((key == (void *) NULL) || (value == (void *) NULL))
     return(MagickFalse);
-  next=(EntryInfo *) AcquireAlignedMemory(1,sizeof(*next));
+  next=(EntryInfo *) AcquireQuantumMemory(1,sizeof(*next));
   if (next == (EntryInfo *) NULL)
     return(MagickFalse);
   LockSemaphoreInfo(hashmap_info->semaphore);
index ca43fd0e0e097b55f91647ac4cbe9f4890cc8383..3c58d24246338a15b689488b583d2a5fb85bbf3e 100644 (file)
@@ -483,7 +483,7 @@ static CubeInfo *GetCubeInfo(void)
   /*
     Initialize tree to describe color cube.
   */
-  cube_info=(CubeInfo *) AcquireAlignedMemory(1,sizeof(*cube_info));
+  cube_info=(CubeInfo *) AcquireQuantumMemory(1,sizeof(*cube_info));
   if (cube_info == (CubeInfo *) NULL)
     return((CubeInfo *) NULL);
   (void) ResetMagickMemory(cube_info,0,sizeof(*cube_info));
@@ -594,7 +594,7 @@ static NodeInfo *GetNodeInfo(CubeInfo *cube_info,const size_t level)
       /*
         Allocate a new nodes of nodes.
       */
-      nodes=(Nodes *) AcquireAlignedMemory(1,sizeof(*nodes));
+      nodes=(Nodes *) AcquireQuantumMemory(1,sizeof(*nodes));
       if (nodes == (Nodes *) NULL)
         return((NodeInfo *) NULL);
       nodes->next=cube_info->node_queue;
index 1c0be0a25ca6ee7a509eed45b3ca064aa8788bdf..29246c6394444787ff2d585d341ef21d8fbcb74a 100644 (file)
@@ -110,7 +110,7 @@ MagickExport ImageView *CloneImageView(const ImageView *image_view)
 
   assert(image_view != (ImageView *) NULL);
   assert(image_view->signature == MagickSignature);
-  clone_view=(ImageView *) AcquireAlignedMemory(1,sizeof(*clone_view));
+  clone_view=(ImageView *) AcquireQuantumMemory(1,sizeof(*clone_view));
   if (clone_view == (ImageView *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(clone_view,0,sizeof(*clone_view));
@@ -726,7 +726,7 @@ MagickExport ImageView *NewImageView(Image *image)
 
   assert(image != (Image *) NULL);
   assert(image->signature == MagickSignature);
-  image_view=(ImageView *) AcquireAlignedMemory(1,sizeof(*image_view));
+  image_view=(ImageView *) AcquireQuantumMemory(1,sizeof(*image_view));
   if (image_view == (ImageView *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(image_view,0,sizeof(*image_view));
@@ -779,7 +779,7 @@ MagickExport ImageView *NewImageViewRegion(Image *image,const ssize_t x,
 
   assert(image != (Image *) NULL);
   assert(image->signature == MagickSignature);
-  image_view=(ImageView *) AcquireAlignedMemory(1,sizeof(*image_view));
+  image_view=(ImageView *) AcquireQuantumMemory(1,sizeof(*image_view));
   if (image_view == (ImageView *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(image_view,0,sizeof(*image_view));
index 968141584b91bb847a2dd996f22a655eb20d422a..95342f35ff37a7e25c304a981355dece04b09bd3 100644 (file)
@@ -157,7 +157,7 @@ MagickExport Image *AcquireImage(const ImageInfo *image_info)
     Allocate image structure.
   */
   (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
-  image=(Image *) AcquireAlignedMemory(1,sizeof(*image));
+  image=(Image *) AcquireQuantumMemory(1,sizeof(*image));
   if (image == (Image *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(image,0,sizeof(*image));
@@ -316,7 +316,7 @@ MagickExport ImageInfo *AcquireImageInfo(void)
   ImageInfo
     *image_info;
 
-  image_info=(ImageInfo *) AcquireAlignedMemory(1,sizeof(*image_info));
+  image_info=(ImageInfo *) AcquireQuantumMemory(1,sizeof(*image_info));
   if (image_info == (ImageInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   GetImageInfo(image_info);
@@ -769,7 +769,7 @@ MagickExport Image *CloneImage(const Image *image,const size_t columns,
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
   assert(exception != (ExceptionInfo *) NULL);
   assert(exception->signature == MagickSignature);
-  clone_image=(Image *) AcquireAlignedMemory(1,sizeof(*clone_image));
+  clone_image=(Image *) AcquireQuantumMemory(1,sizeof(*clone_image));
   if (clone_image == (Image *) NULL)
     ThrowImageException(ResourceLimitError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(clone_image,0,sizeof(*clone_image));
index e8b7abe2de61398a27c7dd9fb9f623e8963f1072..34e9c10006583263fe17d759fc21aa07e34df080 100644 (file)
@@ -918,7 +918,7 @@ static MagickBooleanType LoadLocaleList(const char *xml,const char *filename,
         while ((isspace((int) ((unsigned char) *q)) != 0) && (q > p))
           q--;
         (void) CopyMagickString(message,p,(size_t) (q-p+2));
-        locale_info=(LocaleInfo *) AcquireAlignedMemory(1,sizeof(*locale_info));
+        locale_info=(LocaleInfo *) AcquireQuantumMemory(1,sizeof(*locale_info));
         if (locale_info == (LocaleInfo *) NULL)
           ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
         (void) ResetMagickMemory(locale_info,0,sizeof(*locale_info));
index 1a37f3d9dfa50c830b5f227327e52efd79295643..4bdecbe0e5b0ab16337ed573d08caf331cf6499f 100644 (file)
@@ -1380,7 +1380,7 @@ static MagickBooleanType LoadLogList(const char *xml,const char *filename,
         /*
           Allocate memory for the log list.
         */
-        log_info=(LogInfo *) AcquireAlignedMemory(1,sizeof(*log_info));
+        log_info=(LogInfo *) AcquireQuantumMemory(1,sizeof(*log_info));
         if (log_info == (LogInfo *) NULL)
           ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
         (void) ResetMagickMemory(log_info,0,sizeof(*log_info));
@@ -1554,7 +1554,7 @@ static MagickBooleanType LoadLogLists(const char *filename,
       *p;
 
     p=LogMap+i;
-    log_info=(LogInfo *) AcquireAlignedMemory(1,sizeof(*log_info));
+    log_info=(LogInfo *) AcquireQuantumMemory(1,sizeof(*log_info));
     if (log_info == (LogInfo *) NULL)
       {
         (void) ThrowMagickException(exception,GetMagickModule(),
index 9c8f461848c464065e1b6ebb08cf353c707ff0ec..9b3ab2f1e648e8c86a33e17a0325d2d5b97d6559 100644 (file)
@@ -1027,7 +1027,7 @@ MagickExport DIR *opendir(const char *path)
       errno=error;
       return((DIR *) NULL);
     }
-  entry=(DIR *) AcquireAlignedMemory(1,sizeof(DIR));
+  entry=(DIR *) AcquireQuantumMemory(1,sizeof(DIR));
   if (entry == (DIR *) NULL)
     return((DIR *) NULL);
   entry->d_VRefNum=search_info.hFileInfo.ioVRefNum;
index e0d7bbad96691ba45bf5fdd2a4f334c234c1ad91..60363a6345b1d1a6d41e88055bd64674dd9857f8 100644 (file)
@@ -765,7 +765,7 @@ static MagickBooleanType LoadMagicList(const char *xml,const char *filename,
         /*
           Magic element.
         */
-        magic_info=(MagicInfo *) AcquireAlignedMemory(1,sizeof(*magic_info));
+        magic_info=(MagicInfo *) AcquireQuantumMemory(1,sizeof(*magic_info));
         if (magic_info == (MagicInfo *) NULL)
           ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
         (void) ResetMagickMemory(magic_info,0,sizeof(*magic_info));
@@ -957,7 +957,7 @@ static MagickBooleanType LoadMagicLists(const char *filename,
       *p;
 
     p=MagicMap+i;
-    magic_info=(MagicInfo *) AcquireAlignedMemory(1,sizeof(*magic_info));
+    magic_info=(MagicInfo *) AcquireQuantumMemory(1,sizeof(*magic_info));
     if (magic_info == (MagicInfo *) NULL)
       {
         (void) ThrowMagickException(exception,GetMagickModule(),
index b50f20ed71db379d9f7bc55420c91904b9322382..5067f38de389cea72bf28ddc781d99e51d087dc8 100644 (file)
@@ -1456,7 +1456,7 @@ MagickExport MagickInfo *SetMagickInfo(const char *name)
 
   assert(name != (const char *) NULL);
   (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",name);
-  magick_info=(MagickInfo *) AcquireAlignedMemory(1,sizeof(*magick_info));
+  magick_info=(MagickInfo *) AcquireQuantumMemory(1,sizeof(*magick_info));
   if (magick_info == (MagickInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(magick_info,0,sizeof(*magick_info));
index 5b56800accf6ca4c492d0cb849a40917a8e15010..e41a19d02b7333d1bf9967acd5492697000ec8ff 100644 (file)
@@ -172,12 +172,12 @@ static MagickBooleanType
 %                                                                             %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-%  AcquireAlignedMemory() returns a pointer to a block of memory at least size
+%  AcquireQuantumMemory() returns a pointer to a block of memory at least size
 %  bytes whose address is a multiple of 16*sizeof(void *).
 %
-%  The format of the AcquireAlignedMemory method is:
+%  The format of the AcquireQuantumMemory method is:
 %
-%      void *AcquireAlignedMemory(const size_t count,const size_t quantum)
+%      void *AcquireQuantumMemory(const size_t count,const size_t quantum)
 %
 %  A description of each parameter follows:
 %
@@ -194,7 +194,7 @@ static inline size_t MagickMax(const size_t x,const size_t y)
   return(y);
 }
 
-MagickExport void *AcquireAlignedMemory(const size_t count,const size_t quantum)
+MagickExport void *AcquireQuantumMemory(const size_t count,const size_t quantum)
 {
   size_t
     size;
@@ -205,7 +205,7 @@ MagickExport void *AcquireAlignedMemory(const size_t count,const size_t quantum)
       errno=ENOMEM;
       return((void *) NULL);
     }
-#if defined(MAGICKCORE_HAVE_POSIX_MEMALIGN)
+#if defined(MAGICKCORE_HAVE_POSIX_MEMALIGN) && !defined(MAGICKCORE_EMBEDDABLE_SUPPORT)
   {
     void
       *memory;
@@ -214,7 +214,7 @@ MagickExport void *AcquireAlignedMemory(const size_t count,const size_t quantum)
       return(memory);
   }
 #endif
-  return(malloc(size));
+  return(malloc(MagickMax(size,AlignedSize)));
 }
 \f
 #if defined(MAGICKCORE_EMBEDDABLE_SUPPORT)
@@ -703,19 +703,19 @@ MagickExport void GetMagickMemoryMethods(
 %                                                                             %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-%  RelinquishAlignedMemory() frees memory acquired with AcquireAlignedMemory()
+%  RelinquishMagickMemory() frees memory acquired with AcquireQuantumMemory()
 %  or reuse.
 %
-%  The format of the RelinquishAlignedMemory method is:
+%  The format of the RelinquishMagickMemory method is:
 %
-%      void *RelinquishAlignedMemory(void *memory)
+%      void *RelinquishMagickMemory(void *memory)
 %
 %  A description of each parameter follows:
 %
 %    o memory: A pointer to a block of memory to free for reuse.
 %
 */
-MagickExport void *RelinquishAlignedMemory(void *memory)
+MagickExport void *RelinquishMagickMemory(void *memory)
 {
   if (memory == (void *) NULL)
     return((void *) NULL);
index 84963614e41f141be181306133072bf7c2f818ef..da77803e32bd2063194f7b9ba1ad6f2eb2cd2af1 100644 (file)
@@ -814,7 +814,7 @@ static MagickBooleanType LoadMimeList(const char *xml,const char *filename,
     /*
       Process mime element.
     */
-    mime_info=(MimeInfo *) AcquireAlignedMemory(1,sizeof(*mime_info));
+    mime_info=(MimeInfo *) AcquireQuantumMemory(1,sizeof(*mime_info));
     if (mime_info == (MimeInfo *) NULL)
       ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
     (void) ResetMagickMemory(mime_info,0,sizeof(*mime_info));
index 3134dd0e787d16839d4b37c42aade23769474e3c..422dafa6c637c83b1c3f2d3d30e895ff903bd271 100644 (file)
@@ -138,7 +138,7 @@ MagickExport ModuleInfo *AcquireModuleInfo(const char *path,const char *tag)
   ModuleInfo
     *module_info;
 
-  module_info=(ModuleInfo *) AcquireAlignedMemory(1,sizeof(*module_info));
+  module_info=(ModuleInfo *) AcquireQuantumMemory(1,sizeof(*module_info));
   if (module_info == (ModuleInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(module_info,0,sizeof(*module_info));
@@ -465,7 +465,7 @@ MagickExport char **GetModuleList(const char *pattern,
       modules=(char **) RelinquishMagickMemory(modules);
       return((char **) NULL);
     }
-  buffer=(struct dirent *) AcquireAlignedMemory(1,sizeof(*buffer)+
+  buffer=(struct dirent *) AcquireQuantumMemory(1,sizeof(*buffer)+
     FILENAME_MAX+1);
   if (buffer == (struct dirent *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
index f6c0a33ed9f798cd98d556a5949f5c4413b305ce..295207a21b997a76683b8ad4c6d8f43cdc1525f9 100644 (file)
@@ -104,7 +104,7 @@ MagickExport MontageInfo *CloneMontageInfo(const ImageInfo *image_info,
   MontageInfo
     *clone_info;
 
-  clone_info=(MontageInfo *) AcquireAlignedMemory(1,sizeof(*clone_info));
+  clone_info=(MontageInfo *) AcquireQuantumMemory(1,sizeof(*clone_info));
   if (clone_info == (MontageInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   GetMontageInfo(image_info,clone_info);
index f89c9c9b7044db9ad1bb123a1d9300664965d0ff..12bba1d70c2bb6b7a315fc9407135d0ea6426cdb 100644 (file)
@@ -1380,7 +1380,7 @@ MagickExport DIR *NTOpenDirectory(const char *path)
     MaxTextExtent);
   if (length >= MaxTextExtent)
     return((DIR *) NULL);
-  entry=(DIR *) AcquireAlignedMemory(1,sizeof(DIR));
+  entry=(DIR *) AcquireQuantumMemory(1,sizeof(DIR));
   if (entry != (DIR *) NULL)
     {
       entry->firsttime=TRUE;
index e5dd5188fc6af8c92a83404de5a90920adb35717..152a72808cdd441b0300354592144e179eaf18b0 100644 (file)
@@ -382,7 +382,7 @@ MagickExport MagickBooleanType NTLoadTypeLists(SplayTreeInfo *type_list,
           continue;
         *pos='\0'; /* Remove (TrueType) from string */
 
-        type_info=(TypeInfo *) AcquireAlignedMemory(1,sizeof(*type_info));
+        type_info=(TypeInfo *) AcquireQuantumMemory(1,sizeof(*type_info));
         if (type_info == (TypeInfo *) NULL)
           ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
         (void) ResetMagickMemory(type_info,0,sizeof(TypeInfo));
index 78e766d2f3d335700b6e25f477006b0617c3c358..c2213e3a22756ac6cbed9c1e631a3e86e816d6d4 100644 (file)
@@ -526,7 +526,7 @@ static size_t **DestroyHistogramThreadSet(size_t **histogram)
   for (i=0; i < (ssize_t) GetOpenMPMaximumThreads(); i++)
     if (histogram[i] != (size_t *) NULL)
       histogram[i]=(size_t *) RelinquishMagickMemory(histogram[i]);
-  histogram=(size_t **) RelinquishAlignedMemory(histogram);
+  histogram=(size_t **) RelinquishMagickMemory(histogram);
   return(histogram);
 }
 
@@ -540,7 +540,7 @@ static size_t **AcquireHistogramThreadSet(const size_t count)
     number_threads;
 
   number_threads=GetOpenMPMaximumThreads();
-  histogram=(size_t **) AcquireAlignedMemory(number_threads,
+  histogram=(size_t **) AcquireQuantumMemory(number_threads,
     sizeof(*histogram));
   if (histogram == (size_t **) NULL)
     return((size_t **) NULL);
index bb127bdfdf79e1b3993bfbf838b85c496908b6d6..7263e18c4344f40da1d5e3b541ddace4b32cc026 100644 (file)
@@ -747,7 +747,7 @@ static MagickBooleanType LoadPolicyList(const char *xml,const char *filename,
         /*
           Policy element.
         */
-        policy_info=(PolicyInfo *) AcquireAlignedMemory(1,sizeof(*policy_info));
+        policy_info=(PolicyInfo *) AcquireQuantumMemory(1,sizeof(*policy_info));
         if (policy_info == (PolicyInfo *) NULL)
           ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
         (void) ResetMagickMemory(policy_info,0,sizeof(*policy_info));
@@ -908,7 +908,7 @@ static MagickBooleanType LoadPolicyLists(const char *filename,
       *p;
 
     p=PolicyMap+i;
-    policy_info=(PolicyInfo *) AcquireAlignedMemory(1,sizeof(*policy_info));
+    policy_info=(PolicyInfo *) AcquireQuantumMemory(1,sizeof(*policy_info));
     if (policy_info == (PolicyInfo *) NULL)
       {
         (void) ThrowMagickException(exception,GetMagickModule(),
index 213d0f91db67081d0491e3728cef6573a1d47ceb..d2a9e0f742e705fc97531f48400e4871a6476c1d 100644 (file)
@@ -349,7 +349,7 @@ static unsigned short **DestroyPixelThreadSet(unsigned short **pixels)
   for (i=0; i < (ssize_t) GetOpenMPMaximumThreads(); i++)
     if (pixels[i] != (unsigned short *) NULL)
       pixels[i]=(unsigned short *) RelinquishMagickMemory(pixels[i]);
-  pixels=(unsigned short **) RelinquishAlignedMemory(pixels);
+  pixels=(unsigned short **) RelinquishMagickMemory(pixels);
   return(pixels);
 }
 
@@ -366,7 +366,7 @@ static unsigned short **AcquirePixelThreadSet(const size_t columns,
     number_threads;
 
   number_threads=GetOpenMPMaximumThreads();
-  pixels=(unsigned short **) AcquireAlignedMemory(number_threads,
+  pixels=(unsigned short **) AcquireQuantumMemory(number_threads,
     sizeof(*pixels));
   if (pixels == (unsigned short **) NULL)
     return((unsigned short **) NULL);
@@ -390,7 +390,7 @@ static cmsHTRANSFORM *DestroyTransformThreadSet(cmsHTRANSFORM *transform)
   for (i=0; i < (ssize_t) GetOpenMPMaximumThreads(); i++)
     if (transform[i] != (cmsHTRANSFORM) NULL)
       cmsDeleteTransform(transform[i]);
-  transform=(cmsHTRANSFORM *) RelinquishAlignedMemory(transform);
+  transform=(cmsHTRANSFORM *) RelinquishMagickMemory(transform);
   return(transform);
 }
 
@@ -409,7 +409,7 @@ static cmsHTRANSFORM *AcquireTransformThreadSet(Image *image,
     number_threads;
 
   number_threads=GetOpenMPMaximumThreads();
-  transform=(cmsHTRANSFORM *) AcquireAlignedMemory(number_threads,
+  transform=(cmsHTRANSFORM *) AcquireQuantumMemory(number_threads,
     sizeof(*transform));
   if (transform == (cmsHTRANSFORM *) NULL)
     return((cmsHTRANSFORM *) NULL);
index c6255f0a44cb4c113b861ba2ec9a2ad101d3da4d..fb1aa0f4f3bef4c2d164be21085548fd1973fed4 100644 (file)
@@ -366,7 +366,7 @@ MagickExport QuantizeInfo *AcquireQuantizeInfo(const ImageInfo *image_info)
   QuantizeInfo
     *quantize_info;
 
-  quantize_info=(QuantizeInfo *) AcquireAlignedMemory(1,sizeof(*quantize_info));
+  quantize_info=(QuantizeInfo *) AcquireQuantumMemory(1,sizeof(*quantize_info));
   if (quantize_info == (QuantizeInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   GetQuantizeInfo(quantize_info);
@@ -977,7 +977,7 @@ MagickExport QuantizeInfo *CloneQuantizeInfo(const QuantizeInfo *quantize_info)
   QuantizeInfo
     *clone_info;
 
-  clone_info=(QuantizeInfo *) AcquireAlignedMemory(1,sizeof(*clone_info));
+  clone_info=(QuantizeInfo *) AcquireQuantumMemory(1,sizeof(*clone_info));
   if (clone_info == (QuantizeInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   GetQuantizeInfo(clone_info);
@@ -1861,7 +1861,7 @@ static CubeInfo *GetCubeInfo(const QuantizeInfo *quantize_info,
   /*
     Initialize tree to describe color cube_info.
   */
-  cube_info=(CubeInfo *) AcquireAlignedMemory(1,sizeof(*cube_info));
+  cube_info=(CubeInfo *) AcquireQuantumMemory(1,sizeof(*cube_info));
   if (cube_info == (CubeInfo *) NULL)
     return((CubeInfo *) NULL);
   (void) ResetMagickMemory(cube_info,0,sizeof(*cube_info));
@@ -1961,7 +1961,7 @@ static NodeInfo *GetNodeInfo(CubeInfo *cube_info,const size_t id,
       /*
         Allocate a new queue of nodes.
       */
-      nodes=(Nodes *) AcquireAlignedMemory(1,sizeof(*nodes));
+      nodes=(Nodes *) AcquireQuantumMemory(1,sizeof(*nodes));
       if (nodes == (Nodes *) NULL)
         return((NodeInfo *) NULL);
       nodes->nodes=(NodeInfo *) AcquireQuantumMemory(NodesInAList,
index 954eda85c4dbe215db509884a1cad4a9c319239a..970a38d1f2a8f8cf30ccead83cc71c07e5075885 100644 (file)
@@ -120,7 +120,7 @@ MagickExport QuantumInfo *AcquireQuantumInfo(const ImageInfo *image_info,
   QuantumInfo
     *quantum_info;
 
-  quantum_info=(QuantumInfo *) AcquireAlignedMemory(1,sizeof(*quantum_info));
+  quantum_info=(QuantumInfo *) AcquireQuantumMemory(1,sizeof(*quantum_info));
   if (quantum_info == (QuantumInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   quantum_info->signature=MagickSignature;
index f7f33d0b993740695dbe12d570e4a3780a4a102b..7046f3c26c1c0824ea8ab29bb6b6aeb2008e0a79 100644 (file)
@@ -172,7 +172,7 @@ MagickExport RandomInfo *AcquireRandomInfo(void)
     *key,
     *nonce;
 
-  random_info=(RandomInfo *) AcquireAlignedMemory(1,sizeof(*random_info));
+  random_info=(RandomInfo *) AcquireQuantumMemory(1,sizeof(*random_info));
   if (random_info == (RandomInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(random_info,0,sizeof(*random_info));
@@ -287,7 +287,7 @@ MagickExport RandomInfo *DestroyRandomInfo(RandomInfo *random_info)
   random_info->signature=(~MagickSignature);
   UnlockSemaphoreInfo(random_info->semaphore);
   DestroySemaphoreInfo(&random_info->semaphore);
-  random_info=(RandomInfo *) RelinquishAlignedMemory(random_info);
+  random_info=(RandomInfo *) RelinquishMagickMemory(random_info);
   return(random_info);
 }
 \f
index 2976362e694bce9a575bcf914c69a09b4e3d2bd8..b17cdf450ac157acc204ed75ce50490e40f3f93b 100644 (file)
@@ -514,7 +514,7 @@ MagickExport MagickBooleanType SetImageRegistry(const RegistryType type,
   }
   if (clone_value == (void *) NULL)
     return(MagickFalse);
-  registry_info=(RegistryInfo *) AcquireAlignedMemory(1,sizeof(*registry_info));
+  registry_info=(RegistryInfo *) AcquireQuantumMemory(1,sizeof(*registry_info));
   if (registry_info == (RegistryInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(registry_info,0,sizeof(*registry_info));
index ab98df09fbb21134390dea25f33ad7fe73d3e5d1..3e81fe11682ad124edd0e0c56be5e321b9540c86 100644 (file)
@@ -759,7 +759,7 @@ MagickExport ResizeFilter *AcquireResizeFilter(const Image *image,
   assert(UndefinedFilter < filter && filter < SentinelFilter);
   assert(exception != (ExceptionInfo *) NULL);
   assert(exception->signature == MagickSignature);
-  resize_filter=(ResizeFilter *) AcquireAlignedMemory(1,sizeof(*resize_filter));
+  resize_filter=(ResizeFilter *) AcquireQuantumMemory(1,sizeof(*resize_filter));
   if (resize_filter == (ResizeFilter *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   /*
@@ -1883,7 +1883,7 @@ static ContributionInfo **DestroyContributionThreadSet(
     if (contribution[i] != (ContributionInfo *) NULL)
       contribution[i]=(ContributionInfo *) RelinquishMagickMemory(
         contribution[i]);
-  contribution=(ContributionInfo **) RelinquishAlignedMemory(contribution);
+  contribution=(ContributionInfo **) RelinquishMagickMemory(contribution);
   return(contribution);
 }
 
@@ -1899,7 +1899,7 @@ static ContributionInfo **AcquireContributionThreadSet(const size_t count)
     number_threads;
 
   number_threads=GetOpenMPMaximumThreads();
-  contribution=(ContributionInfo **) AcquireAlignedMemory(number_threads,
+  contribution=(ContributionInfo **) AcquireQuantumMemory(number_threads,
     sizeof(*contribution));
   if (contribution == (ContributionInfo **) NULL)
     return((ContributionInfo **) NULL);
index c6dec075bba1a12f400568fc88074e5ae6600122..e2b90cdf574b6a1630b1f9e44087995724b87965 100644 (file)
@@ -308,7 +308,7 @@ static MagickBooleanType Classify(Image *image,short **extrema,
           }
         else
           {
-            cluster=(Cluster *) AcquireAlignedMemory(1,sizeof(*cluster));
+            cluster=(Cluster *) AcquireQuantumMemory(1,sizeof(*cluster));
             head=cluster;
           }
         if (cluster == (Cluster *) NULL)
@@ -330,7 +330,7 @@ static MagickBooleanType Classify(Image *image,short **extrema,
       /*
         No classes were identified-- create one.
       */
-      cluster=(Cluster *) AcquireAlignedMemory(1,sizeof(*cluster));
+      cluster=(Cluster *) AcquireQuantumMemory(1,sizeof(*cluster));
       if (cluster == (Cluster *) NULL)
         ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",
           image->filename);
@@ -1040,7 +1040,7 @@ MagickExport MagickBooleanType GetImageDynamicThreshold(const Image *image,
           }
         else
           {
-            cluster=(Cluster *) AcquireAlignedMemory(1,sizeof(*cluster));
+            cluster=(Cluster *) AcquireQuantumMemory(1,sizeof(*cluster));
             head=cluster;
           }
         if (cluster == (Cluster *) NULL)
@@ -1066,7 +1066,7 @@ MagickExport MagickBooleanType GetImageDynamicThreshold(const Image *image,
       /*
         No classes were identified-- create one.
       */
-      cluster=(Cluster *) AcquireAlignedMemory(1,sizeof(*cluster));
+      cluster=(Cluster *) AcquireQuantumMemory(1,sizeof(*cluster));
       if (cluster == (Cluster *) NULL)
         {
           (void) ThrowMagickException(exception,GetMagickModule(),
@@ -1376,7 +1376,7 @@ static IntervalTree *InitializeIntervalTree(const ZeroCrossing *zero_crossing,
   /*
     The root is the entire histogram.
   */
-  root=(IntervalTree *) AcquireAlignedMemory(1,sizeof(*root));
+  root=(IntervalTree *) AcquireQuantumMemory(1,sizeof(*root));
   root->child=(IntervalTree *) NULL;
   root->sibling=(IntervalTree *) NULL;
   root->tau=0.0;
index 58a217d4322e5ad4a844378511a928a05ca0d026..17be2b8373d5e615b3d5a6ab2c55639afb994755 100644 (file)
@@ -369,7 +369,7 @@ static RadonInfo *AcquireRadonInfo(const Image *image,const size_t width,
   RadonInfo
     *radon_info;
 
-  radon_info=(RadonInfo *) AcquireAlignedMemory(1,sizeof(*radon_info));
+  radon_info=(RadonInfo *) AcquireQuantumMemory(1,sizeof(*radon_info));
   if (radon_info == (RadonInfo *) NULL)
     return((RadonInfo *) NULL);
   (void) ResetMagickMemory(radon_info,0,sizeof(*radon_info));
index 1a7d0007d3f0d2049532a78a023d59794e0142eb..dc4b4d838391ca98848a3c14fe6b00cc3a36c6d8 100644 (file)
@@ -120,7 +120,7 @@ MagickExport SignatureInfo *AcquireSignatureInfo(void)
   unsigned int
     lsb_first;
 
-  signature_info=(SignatureInfo *) AcquireAlignedMemory(1,sizeof(*signature_info));
+  signature_info=(SignatureInfo *) AcquireQuantumMemory(1,sizeof(*signature_info));
   if (signature_info == (SignatureInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(signature_info,0,sizeof(*signature_info));
index 08e8118ac44cbc0474a523b0de37000ba278ded0..96778c425edb11a00d6682481960cb4c37545822 100644 (file)
@@ -182,7 +182,7 @@ MagickExport MagickBooleanType AddValueToSplayTree(SplayTreeInfo *splay_tree,
           return(MagickTrue);
         }
     }
-  node=(NodeInfo *) AcquireAlignedMemory(1,sizeof(*node));
+  node=(NodeInfo *) AcquireQuantumMemory(1,sizeof(*node));
   if (node == (NodeInfo *) NULL)
     {
       UnlockSemaphoreInfo(splay_tree->semaphore);
@@ -1098,7 +1098,7 @@ MagickExport SplayTreeInfo *NewSplayTree(
   SplayTreeInfo
     *splay_tree;
 
-  splay_tree=(SplayTreeInfo *) AcquireAlignedMemory(1,sizeof(*splay_tree));
+  splay_tree=(SplayTreeInfo *) AcquireQuantumMemory(1,sizeof(*splay_tree));
   if (splay_tree == (SplayTreeInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(splay_tree,0,sizeof(*splay_tree));
index f4b261fd7fb2e67c57e94cc5ff27914a69171c7f..d44fd0909aae939be320ef406c8510e14942a153 100644 (file)
@@ -141,7 +141,7 @@ static MagickPixelPacket **DestroyPixelThreadSet(MagickPixelPacket **pixels)
   for (i=0; i < (ssize_t) GetOpenMPMaximumThreads(); i++)
     if (pixels[i] != (MagickPixelPacket *) NULL)
       pixels[i]=(MagickPixelPacket *) RelinquishMagickMemory(pixels[i]);
-  pixels=(MagickPixelPacket **) RelinquishAlignedMemory(pixels);
+  pixels=(MagickPixelPacket **) RelinquishMagickMemory(pixels);
   return(pixels);
 }
 
@@ -158,7 +158,7 @@ static MagickPixelPacket **AcquirePixelThreadSet(const Image *image)
     number_threads;
 
   number_threads=GetOpenMPMaximumThreads();
-  pixels=(MagickPixelPacket **) AcquireAlignedMemory(number_threads,
+  pixels=(MagickPixelPacket **) AcquireQuantumMemory(number_threads,
     sizeof(*pixels));
   if (pixels == (MagickPixelPacket **) NULL)
     return((MagickPixelPacket **) NULL);
index 6b5da155c0497cddc5f0c25347fc0802e80a2892..936e879aefc77abc1f3917e876752808398f717a 100644 (file)
@@ -152,7 +152,7 @@ MagickExport StreamInfo *AcquireStreamInfo(const ImageInfo *image_info)
   StreamInfo
     *stream_info;
 
-  stream_info=(StreamInfo *) AcquireAlignedMemory(1,sizeof(*stream_info));
+  stream_info=(StreamInfo *) AcquireQuantumMemory(1,sizeof(*stream_info));
   if (stream_info == (StreamInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(stream_info,0,sizeof(*stream_info));
index 50814d62939a9655e96dc5b5a05ecb53b3e55a38..5cc341ce8ecc7d178a85280d13dc129055e2f174 100644 (file)
@@ -158,7 +158,7 @@ MagickExport StringInfo *AcquireStringInfo(const size_t length)
   StringInfo
     *string_info;
 
-  string_info=(StringInfo *) AcquireAlignedMemory(1,sizeof(*string_info));
+  string_info=(StringInfo *) AcquireQuantumMemory(1,sizeof(*string_info));
   if (string_info == (StringInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(string_info,0,sizeof(*string_info));
index e3126447f385e040f85842421854fb27041d8606..5b76062fe90dc97f039858693fd626a1da3351bb 100644 (file)
@@ -69,7 +69,7 @@ MagickExport MagickBooleanType MagickCreateThreadKey(MagickThreadKey *key)
   *key=TlsAlloc();
   return(*key != TLS_OUT_OF_INDEXES ? MagickTrue : MagickFalse);
 #else
-  *key=AcquireAlignedMemory(1,sizeof(key));
+  *key=AcquireQuantumMemory(1,sizeof(key));
   return(*key != (void *) NULL ? MagickTrue : MagickFalse);
 #endif
 }
index 1c4bf16970241d64ca8c906592f97355714d84d1..b581498d2f2d62ee554009181f2a17e7938e525b 100644 (file)
@@ -933,7 +933,7 @@ MagickExport ThresholdMap *GetThresholdMapFile(const char *xml,
   }
 
   /* The map has been found -- Allocate a Threshold Map to return */
-  map = (ThresholdMap *)AcquireAlignedMemory(1,sizeof(ThresholdMap));
+  map = (ThresholdMap *)AcquireQuantumMemory(1,sizeof(ThresholdMap));
   if ( map == (ThresholdMap *)NULL )
     ThrowFatalException(ResourceLimitFatalError,"UnableToAcquireThresholdMap");
   map->map_id = (char *)NULL;
index ac8e36618d7849e3bd8be13b3cc6e755c0b3d502..48451a600bef2462ed683437da6c8dce52e469c2 100644 (file)
@@ -90,7 +90,7 @@ MagickExport TimerInfo *AcquireTimerInfo(void)
   TimerInfo
     *timer_info;
 
-  timer_info=(TimerInfo *) AcquireAlignedMemory(1,sizeof(*timer_info));
+  timer_info=(TimerInfo *) AcquireQuantumMemory(1,sizeof(*timer_info));
   if (timer_info == (TimerInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"UnableToAcquireString");
   (void) ResetMagickMemory(timer_info,0,sizeof(*timer_info));
index 79774a3a3c310826210dc2763b48fdb025f38c0f..67d3c3920ad91163af463ad38bb09d15d11b7514 100644 (file)
@@ -94,7 +94,7 @@ MagickExport TokenInfo *AcquireTokenInfo(void)
   TokenInfo
     *token_info;
 
-  token_info=(TokenInfo *) AcquireAlignedMemory(1,sizeof(*token_info));
+  token_info=(TokenInfo *) AcquireQuantumMemory(1,sizeof(*token_info));
   if (token_info == (TokenInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   token_info->signature=MagickSignature;
index 6efa28630fa8872bd2f1c19d88cd3b696047c92c..4fb66050797a04d44d469d792f97631fdb29e3d1 100644 (file)
@@ -695,7 +695,7 @@ MagickExport MagickBooleanType LoadFontConfigFonts(SplayTreeInfo *type_list,
     GetPathComponent((const char *) file,ExtensionPath,extension);
     if ((*extension != '\0') && (LocaleCompare(extension,"gz") == 0))
       continue;
-    type_info=(TypeInfo *) AcquireAlignedMemory(1,sizeof(*type_info));
+    type_info=(TypeInfo *) AcquireQuantumMemory(1,sizeof(*type_info));
     if (type_info == (TypeInfo *) NULL)
       continue;
     (void) ResetMagickMemory(type_info,0,sizeof(*type_info));
@@ -1064,7 +1064,7 @@ static MagickBooleanType LoadTypeList(const char *xml,const char *filename,
         /*
           Type element.
         */
-        type_info=(TypeInfo *) AcquireAlignedMemory(1,sizeof(*type_info));
+        type_info=(TypeInfo *) AcquireQuantumMemory(1,sizeof(*type_info));
         if (type_info == (TypeInfo *) NULL)
           ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
         (void) ResetMagickMemory(type_info,0,sizeof(*type_info));
index f1a350baa0d075651c728e0fad3c77312abef1a8..7539a96848a2d2569cb329548c4027f7e304a528 100644 (file)
@@ -1722,7 +1722,7 @@ MagickExport char **ListFiles(const char *directory,const char *pattern,
   /*
     Save the current and change to the new directory.
   */
-  buffer=(struct dirent *) AcquireAlignedMemory(1,sizeof(*buffer)+
+  buffer=(struct dirent *) AcquireQuantumMemory(1,sizeof(*buffer)+
     FILENAME_MAX+1);
   if (buffer == (struct dirent *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
index 150e544440bba6184423d4aabff7f9a635e82745..663a53e246720c62ad3c21408f26179f15bec66b 100644 (file)
@@ -111,7 +111,7 @@ DIR *opendir(char *name)
   /*
     Allocate memory for handle and the pattern.
   */
-  directory=(DIR *) AcquireAlignedMemory(1,sizeof(DIR));
+  directory=(DIR *) AcquireQuantumMemory(1,sizeof(DIR));
   if (directory == (DIR *) NULL)
     {
       errno=ENOMEM;
index ccc34fa616169f8f54e1ced6bf4a0f436bf750d2..5cf2a3bb03b7833decc1a1db01c2b583725f1ace 100644 (file)
@@ -167,7 +167,7 @@ MagickExport XMLTreeInfo *AddChildToXMLTree(XMLTreeInfo *xml_info,
 
   if (xml_info == (XMLTreeInfo *) NULL)
     return((XMLTreeInfo *) NULL);
-  child=(XMLTreeInfo *) AcquireAlignedMemory(1,sizeof(*child));
+  child=(XMLTreeInfo *) AcquireQuantumMemory(1,sizeof(*child));
   if (child == (XMLTreeInfo *) NULL)
     return((XMLTreeInfo *) NULL);
   (void) ResetMagickMemory(child,0,sizeof(*child));
@@ -1420,7 +1420,7 @@ static void ParseProcessingInstructions(XMLTreeRoot *root,char *xml,
     }
   if (root->processing_instructions[0] == (char **) NULL)
     {
-      root->processing_instructions=(char ***) AcquireAlignedMemory(1,sizeof(
+      root->processing_instructions=(char ***) AcquireQuantumMemory(1,sizeof(
         *root->processing_instructions));
       if (root->processing_instructions ==(char ***) NULL)
         ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
@@ -1486,7 +1486,7 @@ static MagickBooleanType ParseInternalDoctype(XMLTreeRoot *root,char *xml,
     i;
 
   n=(char *) NULL;
-  predefined_entitites=(char **) AcquireAlignedMemory(1,sizeof(sentinel));
+  predefined_entitites=(char **) AcquireQuantumMemory(1,sizeof(sentinel));
   if (predefined_entitites == (char **) NULL)
     ThrowFatalException(ResourceLimitError,"MemoryAllocationFailed");
   (void) CopyMagickMemory(predefined_entitites,sentinel,sizeof(sentinel));
@@ -2086,7 +2086,7 @@ MagickExport XMLTreeInfo *NewXMLTreeTag(const char *tag)
   XMLTreeRoot
     *root;
 
-  root=(XMLTreeRoot *) AcquireAlignedMemory(1,sizeof(*root));
+  root=(XMLTreeRoot *) AcquireQuantumMemory(1,sizeof(*root));
   if (root == (XMLTreeRoot *) NULL)
     return((XMLTreeInfo *) NULL);
   (void) ResetMagickMemory(root,0,sizeof(*root));
@@ -2095,7 +2095,7 @@ MagickExport XMLTreeInfo *NewXMLTreeTag(const char *tag)
     root->root.tag=ConstantString(tag);
   root->node=(&root->root);
   root->root.content=ConstantString("");
-  root->entities=(char **) AcquireAlignedMemory(1,sizeof(predefined_entities));
+  root->entities=(char **) AcquireQuantumMemory(1,sizeof(predefined_entities));
   if (root->entities == (char **) NULL)
     return((XMLTreeInfo *) NULL);
   (void) CopyMagickMemory(root->entities,predefined_entities,
index bca60ebe2adca259b493a106234002499e1da2da..3121aa59c10bf7affb1088fd79df8f12a7ce1575 100644 (file)
@@ -4265,7 +4265,7 @@ static Image *XGetWindowImage(Display *display,const Window window,
                 /*
                   Append colormap to colormap list.
                 */
-                p=(ColormapInfo *) AcquireAlignedMemory(1,sizeof(*p));
+                p=(ColormapInfo *) AcquireQuantumMemory(1,sizeof(*p));
                 if (p == (ColormapInfo *) NULL)
                   return((Image *) NULL);
                 p->colormap=window_info[id].colormap;
@@ -5078,7 +5078,7 @@ MagickExport XWindows *XInitializeWindows(Display *display,
   /*
     Allocate windows structure.
   */
-  windows=(XWindows *) AcquireAlignedMemory(1,sizeof(*windows));
+  windows=(XWindows *) AcquireQuantumMemory(1,sizeof(*windows));
   if (windows == (XWindows *) NULL)
     {
       ThrowXWindowFatalException(XServerFatalError,"MemoryAllocationFailed",
index 36ba26ba5c019f1f51c1e13d00914a629417583e..44db734693d0372fdf16ef52e267a609ecabb9b5 100644 (file)
@@ -129,7 +129,7 @@ static MagickWand *CloneMagickWandFromImages(const MagickWand *wand,
   assert(wand->signature == WandSignature);
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
-  clone_wand=(MagickWand *) AcquireAlignedMemory(1,sizeof(*clone_wand));
+  clone_wand=(MagickWand *) AcquireQuantumMemory(1,sizeof(*clone_wand));
   if (clone_wand == (MagickWand *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       images->filename);
@@ -201,7 +201,7 @@ WandExport PixelView *ClonePixelView(const PixelView *pixel_view)
   assert(pixel_view->signature == WandSignature);
   if (pixel_view->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",pixel_view->name);
-  clone_view=(PixelView *) AcquireAlignedMemory(1,sizeof(*clone_view));
+  clone_view=(PixelView *) AcquireQuantumMemory(1,sizeof(*clone_view));
   if (clone_view == (PixelView *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       pixel_view->name);
@@ -262,7 +262,7 @@ static PixelWand ***DestroyPixelsThreadSet(PixelWand ***pixel_wands,
   for (i=0; i < (ssize_t) number_threads; i++)
     if (pixel_wands[i] != (PixelWand **) NULL)
       pixel_wands[i]=DestroyPixelWands(pixel_wands[i],number_wands);
-  pixel_wands=(PixelWand ***) RelinquishAlignedMemory(pixel_wands);
+  pixel_wands=(PixelWand ***) RelinquishMagickMemory(pixel_wands);
   return(pixel_wands);
 }
 
@@ -2332,7 +2332,7 @@ static PixelWand ***AcquirePixelsThreadSet(const size_t number_wands,
   register ssize_t
     i;
 
-  pixel_wands=(PixelWand ***) AcquireAlignedMemory(number_threads,
+  pixel_wands=(PixelWand ***) AcquireQuantumMemory(number_threads,
     sizeof(*pixel_wands));
   if (pixel_wands == (PixelWand ***) NULL)
     return((PixelWand ***) NULL);
@@ -2353,7 +2353,7 @@ WandExport PixelView *NewPixelView(MagickWand *wand)
 
   assert(wand != (MagickWand *) NULL);
   assert(wand->signature == MagickSignature);
-  pixel_view=(PixelView *) AcquireAlignedMemory(1,sizeof(*pixel_view));
+  pixel_view=(PixelView *) AcquireQuantumMemory(1,sizeof(*pixel_view));
   if (pixel_view == (PixelView *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       GetExceptionMessage(errno));
@@ -2412,7 +2412,7 @@ WandExport PixelView *NewPixelViewRegion(MagickWand *wand,const ssize_t x,
 
   assert(wand != (MagickWand *) NULL);
   assert(wand->signature == MagickSignature);
-  pixel_view=(PixelView *) AcquireAlignedMemory(1,sizeof(*pixel_view));
+  pixel_view=(PixelView *) AcquireQuantumMemory(1,sizeof(*pixel_view));
   if (pixel_view == (PixelView *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       GetExceptionMessage(errno));
index e7eccec364065c9f04a414c2034df47599a19cea..64b1e2b7862b341af431ebab680710e0e9ebdb22 100644 (file)
@@ -556,7 +556,7 @@ WandExport DrawingWand *CloneDrawingWand(const DrawingWand *wand)
   assert(wand->signature == WandSignature);
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
-  clone_wand=(DrawingWand *) AcquireAlignedMemory(1,sizeof(*clone_wand));
+  clone_wand=(DrawingWand *) AcquireQuantumMemory(1,sizeof(*clone_wand));
   if (clone_wand == (DrawingWand *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,
       "MemoryAllocationFailed",GetExceptionMessage(errno));
@@ -6578,7 +6578,7 @@ WandExport DrawingWand *NewDrawingWand(void)
   quantum=GetMagickQuantumDepth(&depth);
   if (depth != MAGICKCORE_QUANTUM_DEPTH)
     ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum);
-  wand=(DrawingWand *) AcquireAlignedMemory(1,sizeof(*wand));
+  wand=(DrawingWand *) AcquireQuantumMemory(1,sizeof(*wand));
   if (wand == (DrawingWand *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       GetExceptionMessage(errno));
@@ -6599,7 +6599,7 @@ WandExport DrawingWand *NewDrawingWand(void)
   wand->pattern_bounds.width=0;
   wand->pattern_bounds.height=0;
   wand->index=0;
-  wand->graphic_context=(DrawInfo **) AcquireAlignedMemory(1,sizeof(
+  wand->graphic_context=(DrawInfo **) AcquireQuantumMemory(1,sizeof(
     *wand->graphic_context));
   if (wand->graphic_context == (DrawInfo **) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
index 26ec38fc879b581e7117cac399b4ccc3081e661e..c66597451840b16b7a87a12dc480d647553b3b5d 100644 (file)
@@ -99,7 +99,7 @@ static MagickWand *CloneMagickWandFromImages(const MagickWand *wand,
   assert(wand->signature == WandSignature);
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
-  clone_wand=(MagickWand *) AcquireAlignedMemory(1,sizeof(*clone_wand));
+  clone_wand=(MagickWand *) AcquireQuantumMemory(1,sizeof(*clone_wand));
   if (clone_wand == (MagickWand *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       images->filename);
index ea9ee863fc9e0b32faf51a4bd27b033378e72c30..a7579773d1616b60ed71a9ef7e0155527e5f3044 100644 (file)
@@ -129,7 +129,7 @@ WandExport MagickWand *CloneMagickWand(const MagickWand *wand)
   assert(wand->signature == WandSignature);
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
-  clone_wand=(MagickWand *) AcquireAlignedMemory(1,sizeof(*clone_wand));
+  clone_wand=(MagickWand *) AcquireQuantumMemory(1,sizeof(*clone_wand));
   if (clone_wand == (MagickWand *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       wand->name);
@@ -1028,7 +1028,7 @@ WandExport MagickWand *NewMagickWand(void)
   quantum=GetMagickQuantumDepth(&depth);
   if (depth != MAGICKCORE_QUANTUM_DEPTH)
     ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum);
-  wand=(MagickWand *) AcquireAlignedMemory(1,sizeof(*wand));
+  wand=(MagickWand *) AcquireQuantumMemory(1,sizeof(*wand));
   if (wand == (MagickWand *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       GetExceptionMessage(errno));
index 6ee213ac41f381b7cf0a4bb64e563a122d138cbb..d171261744ae2b65be390fcb8b6bdc87faab9c46 100644 (file)
@@ -162,7 +162,7 @@ WandExport PixelIterator *ClonePixelIterator(const PixelIterator *iterator)
   assert(iterator->signature == WandSignature);
   if (iterator->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
-  clone_iterator=(PixelIterator *) AcquireAlignedMemory(1,
+  clone_iterator=(PixelIterator *) AcquireQuantumMemory(1,
     sizeof(*clone_iterator));
   if (clone_iterator == (PixelIterator *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
@@ -313,7 +313,7 @@ WandExport PixelIterator *NewPixelIterator(MagickWand *wand)
   view=AcquireCacheView(image);
   if (view == (CacheView *) NULL)
     return((PixelIterator *) NULL);
-  iterator=(PixelIterator *) AcquireAlignedMemory(1,sizeof(*iterator));
+  iterator=(PixelIterator *) AcquireQuantumMemory(1,sizeof(*iterator));
   if (iterator == (PixelIterator *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       GetExceptionMessage(errno));
@@ -428,7 +428,7 @@ WandExport PixelIterator *NewPixelRegionIterator(MagickWand *wand,
   view=AcquireCacheView(image);
   if (view == (CacheView *) NULL)
     return((PixelIterator *) NULL);
-  iterator=(PixelIterator *) AcquireAlignedMemory(1,sizeof(*iterator));
+  iterator=(PixelIterator *) AcquireQuantumMemory(1,sizeof(*iterator));
   if (iterator == (PixelIterator *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       wand->name);
index 862704ed6e3dc09cf7aa13badd9ce2ba3e462006..617f5f94f77543a8abe4258486953b015d1d37c8 100644 (file)
@@ -148,7 +148,7 @@ WandExport PixelWand *ClonePixelWand(const PixelWand *wand)
   assert(wand->signature == WandSignature);
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
-  clone_wand=(PixelWand *) AcquireAlignedMemory(1,sizeof(*clone_wand));
+  clone_wand=(PixelWand *) AcquireQuantumMemory(1,sizeof(*clone_wand));
   if (clone_wand == (PixelWand *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       wand->name);
@@ -400,7 +400,7 @@ WandExport PixelWand *NewPixelWand(void)
   quantum=GetMagickQuantumDepth(&depth);
   if (depth != MAGICKCORE_QUANTUM_DEPTH)
     ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum);
-  wand=(PixelWand *) AcquireAlignedMemory(1,sizeof(*wand));
+  wand=(PixelWand *) AcquireQuantumMemory(1,sizeof(*wand));
   if (wand == (PixelWand *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       GetExceptionMessage(errno));
index f66ace021e69b405f055071421ceac029d574ca0..cded62e9e2568eb057a3ee22e6bc3aefea9da9e7 100644 (file)
@@ -127,7 +127,7 @@ WandExport WandView *CloneWandView(const WandView *wand_view)
   assert(wand_view->signature == WandSignature);
   if (wand_view->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand_view->name);
-  clone_view=(WandView *) AcquireAlignedMemory(1,sizeof(*clone_view));
+  clone_view=(WandView *) AcquireQuantumMemory(1,sizeof(*clone_view));
   if (clone_view == (WandView *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       wand_view->name);
@@ -184,7 +184,7 @@ static PixelWand ***DestroyPixelsThreadSet(PixelWand ***pixel_wands,
   for (i=0; i < (ssize_t) number_threads; i++)
     if (pixel_wands[i] != (PixelWand **) NULL)
       pixel_wands[i]=DestroyPixelWands(pixel_wands[i],number_wands);
-  pixel_wands=(PixelWand ***) RelinquishAlignedMemory(pixel_wands);
+  pixel_wands=(PixelWand ***) RelinquishMagickMemory(pixel_wands);
   return(pixel_wands);
 }
 
@@ -738,7 +738,7 @@ static PixelWand ***AcquirePixelsThreadSet(const size_t number_wands,
   register ssize_t
     i;
 
-  pixel_wands=(PixelWand ***) AcquireAlignedMemory(number_threads,
+  pixel_wands=(PixelWand ***) AcquireQuantumMemory(number_threads,
     sizeof(*pixel_wands));
   if (pixel_wands == (PixelWand ***) NULL)
     return((PixelWand ***) NULL);
@@ -759,7 +759,7 @@ WandExport WandView *NewWandView(MagickWand *wand)
 
   assert(wand != (MagickWand *) NULL);
   assert(wand->signature == WandSignature);
-  wand_view=(WandView *) AcquireAlignedMemory(1,sizeof(*wand_view));
+  wand_view=(WandView *) AcquireQuantumMemory(1,sizeof(*wand_view));
   if (wand_view == (WandView *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       GetExceptionMessage(errno));
@@ -819,7 +819,7 @@ WandExport WandView *NewWandViewExtent(MagickWand *wand,const ssize_t x,
 
   assert(wand != (MagickWand *) NULL);
   assert(wand->signature == WandSignature);
-  wand_view=(WandView *) AcquireAlignedMemory(1,sizeof(*wand_view));
+  wand_view=(WandView *) AcquireQuantumMemory(1,sizeof(*wand_view));
   if (wand_view == (WandView *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       GetExceptionMessage(errno));