diff --git a/coders/djvu.c b/coders/djvu.c
index 424618d..7b31ff1 100644
--- a/coders/djvu.c
+++ b/coders/djvu.c
@@ -794,7 +794,7 @@
/*
* Allocate a LoadContext structure.
*/
- lc = (LoadContext *) AcquireMagickMemory(sizeof(*lc));
+ lc = (LoadContext *) AcquireAlignedMemory(1,sizeof(*lc));
if (lc == NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
diff --git a/coders/gif.c b/coders/gif.c
index 8dde617..bc65fab 100644
--- a/coders/gif.c
+++ b/coders/gif.c
@@ -194,7 +194,7 @@
register long
i;
- lzw_info=(LZWInfo *) AcquireMagickMemory(sizeof(*lzw_info));
+ lzw_info=(LZWInfo *) AcquireAlignedMemory(1,sizeof(*lzw_info));
if (lzw_info == (LZWInfo *) NULL)
return((LZWInfo *) NULL);
(void) ResetMagickMemory(lzw_info,0,sizeof(*lzw_info));
@@ -225,7 +225,7 @@
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 *) AcquireMagickMemory(sizeof(*lzw_info->stack));
+ lzw_info->stack=(LZWStack *) AcquireAlignedMemory(1,sizeof(*lzw_info->stack));
if (lzw_info->stack == (LZWStack *) NULL)
{
lzw_info=RelinquishLZWInfo(lzw_info);
diff --git a/coders/msl.c b/coders/msl.c
index e8dc984..d2346db 100644
--- a/coders/msl.c
+++ b/coders/msl.c
@@ -7590,7 +7590,7 @@
msl_info.draw_info=(DrawInfo **) AcquireMagickMemory(
sizeof(*msl_info.draw_info));
/* top of the stack is the MSL file itself */
- msl_info.image=(Image **) AcquireMagickMemory(sizeof(*msl_info.image));
+ msl_info.image=(Image **) AcquireAlignedMemory(1,sizeof(*msl_info.image));
msl_info.attributes=(Image **) AcquireMagickMemory(
sizeof(*msl_info.attributes));
msl_info.group_info=(MSLGroupInfo *) AcquireMagickMemory(
diff --git a/coders/png.c b/coders/png.c
index 11f34e1..69ed1d9 100644
--- a/coders/png.c
+++ b/coders/png.c
@@ -2801,7 +2801,7 @@
create a new object buffer.
*/
mng_info->ob[object_id]=(MngBuffer *)
- AcquireMagickMemory(sizeof(MngBuffer));
+ AcquireAlignedMemory(1,sizeof(MngBuffer));
if (mng_info->ob[object_id] != (MngBuffer *) NULL)
{
mng_info->ob[object_id]->image=(Image *) NULL;
@@ -2944,7 +2944,7 @@
Allocate a MngInfo structure.
*/
have_mng_structure=MagickFalse;
- mng_info=(MngInfo *) AcquireMagickMemory(sizeof(MngInfo));
+ mng_info=(MngInfo *) AcquireAlignedMemory(1,sizeof(MngInfo));
if (mng_info == (MngInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
/*
@@ -3241,7 +3241,7 @@
open alpha_blob, attached to alpha_image
*/
- color_image_info=(ImageInfo *)AcquireMagickMemory(sizeof(ImageInfo));
+ color_image_info=(ImageInfo *)AcquireAlignedMemory(1,sizeof(ImageInfo));
if (color_image_info == (ImageInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
GetImageInfo(color_image_info);
@@ -3261,7 +3261,7 @@
if ((image_info->ping == MagickFalse) && (jng_color_type >= 12))
{
alpha_image_info=(ImageInfo *)
- AcquireMagickMemory(sizeof(ImageInfo));
+ AcquireAlignedMemory(1,sizeof(ImageInfo));
if (alpha_image_info == (ImageInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
GetImageInfo(alpha_image_info);
@@ -3709,7 +3709,7 @@
Allocate a MngInfo structure.
*/
have_mng_structure=MagickFalse;
- mng_info=(MngInfo *) AcquireMagickMemory(sizeof(*mng_info));
+ mng_info=(MngInfo *) AcquireAlignedMemory(1,sizeof(*mng_info));
if (mng_info == (MngInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
/*
@@ -3881,7 +3881,7 @@
/*
Allocate a MngInfo structure.
*/
- mng_info=(MngInfo *) AcquireMagickMemory(sizeof(MngInfo));
+ mng_info=(MngInfo *) AcquireAlignedMemory(1,sizeof(MngInfo));
if (mng_info == (MngInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
/*
@@ -7981,7 +7981,7 @@
Allocate a MngInfo structure.
*/
have_mng_structure=MagickFalse;
- mng_info=(MngInfo *) AcquireMagickMemory(sizeof(MngInfo));
+ mng_info=(MngInfo *) AcquireAlignedMemory(1,sizeof(MngInfo));
if (mng_info == (MngInfo *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
/*
@@ -8629,7 +8629,7 @@
Allocate a MngInfo structure.
*/
have_mng_structure=MagickFalse;
- mng_info=(MngInfo *) AcquireMagickMemory(sizeof(MngInfo));
+ mng_info=(MngInfo *) AcquireAlignedMemory(1,sizeof(MngInfo));
if (mng_info == (MngInfo *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
/*
@@ -8725,7 +8725,7 @@
Allocate a MngInfo structure.
*/
have_mng_structure=MagickFalse;
- mng_info=(MngInfo *) AcquireMagickMemory(sizeof(MngInfo));
+ mng_info=(MngInfo *) AcquireAlignedMemory(1,sizeof(MngInfo));
if (mng_info == (MngInfo *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
/*
diff --git a/coders/svg.c b/coders/svg.c
index 413d5af..eb9224f 100644
--- a/coders/svg.c
+++ b/coders/svg.c
@@ -259,12 +259,12 @@
SVGInfo
*svg_info;
- svg_info=(SVGInfo *) AcquireMagickMemory(sizeof(*svg_info));
+ svg_info=(SVGInfo *) AcquireAlignedMemory(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 *) AcquireMagickMemory(sizeof(*svg_info->scale));
+ svg_info->scale=(double *) AcquireAlignedMemory(1,sizeof(*svg_info->scale));
if (svg_info->scale == (double *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
GetAffineMatrix(&svg_info->affine);
diff --git a/coders/vid.c b/coders/vid.c
index 68cd0d0..60a62ee 100644
--- a/coders/vid.c
+++ b/coders/vid.c
@@ -139,7 +139,7 @@
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
image=AcquireImage(image_info);
- filelist=(char **) AcquireMagickMemory(sizeof(*filelist));
+ filelist=(char **) AcquireAlignedMemory(1,sizeof(*filelist));
if (filelist == (char **) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
filelist[0]=ConstantString(image_info->filename);
diff --git a/coders/xwd.c b/coders/xwd.c
index b8deaf4..6d53ba3 100644
--- a/coders/xwd.c
+++ b/coders/xwd.c
@@ -255,7 +255,7 @@
/*
Initialize the X image.
*/
- ximage=(XImage *) AcquireMagickMemory(sizeof(*ximage));
+ ximage=(XImage *) AcquireAlignedMemory(1,sizeof(*ximage));
if (ximage == (XImage *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
ximage->depth=(int) header.pixmap_depth;
diff --git a/config/configure.xml b/config/configure.xml
index 6872396..fcc0c88 100644
--- a/config/configure.xml
+++ b/config/configure.xml
@@ -9,7 +9,7 @@
<configure name="NAME" value="ImageMagick"/>
<configure name="LIB_VERSION" value="0x658"/>
<configure name="LIB_VERSION_NUMBER" value="6,5,8,6"/>
- <configure name="RELEASE_DATE" value="2009-12-11"/>
+ <configure name="RELEASE_DATE" value="2009-12-12"/>
<configure name="CONFIGURE" value="./configure "/>
<configure name="PREFIX" value="/usr/local"/>
<configure name="EXEC-PREFIX" value="/usr/local"/>
diff --git a/magick/PreRvIcccm.c b/magick/PreRvIcccm.c
index 034cef5..2b0a2b5 100644
--- a/magick/PreRvIcccm.c
+++ b/magick/PreRvIcccm.c
@@ -127,17 +127,17 @@
*/
XClassHint *XAllocClassHint)
{
- return((XClassHint *) AcquireMagickMemory(sizeof(XClassHint)));
+ return((XClassHint *) AcquireAlignedMemory(1,sizeof(XClassHint)));
}
XIconSize *XAllocIconSize)
{
- return((XIconSize *) AcquireMagickMemory(sizeof(XIconSize)));
+ return((XIconSize *) AcquireAlignedMemory(1,sizeof(XIconSize)));
}
XSizeHints *XAllocSizeHints)
{
- return((XSizeHints *) AcquireMagickMemory(sizeof(XSizeHints)));
+ return((XSizeHints *) AcquireAlignedMemory(1,sizeof(XSizeHints)));
}
Status XReconfigureWMWindow(Display *display,Window window,int screen_number,
@@ -148,12 +148,12 @@
XStandardColormap *XAllocStandardColormap)
{
- return((XStandardColormap *) AcquireMagickMemory(sizeof(XStandardColormap)));
+ return((XStandardColormap *) AcquireAlignedMemory(1,sizeof(XStandardColormap)));
}
XWMHints *XAllocWMHints)
{
- return((XWMHints *) AcquireMagickMemory(sizeof(XWMHints)));
+ return((XWMHints *) AcquireAlignedMemory(1,sizeof(XWMHints)));
}
Status XGetGCValues(Display *display,GC gc,unsigned long mask,
diff --git a/magick/animate.c b/magick/animate.c
index ee74d5b..031d7ea 100644
--- a/magick/animate.c
+++ b/magick/animate.c
@@ -413,7 +413,7 @@
/*
Expand the filenames.
*/
- filelist=(char **) AcquireMagickMemory(sizeof(char *));
+ filelist=(char **) AcquireAlignedMemory(1,sizeof(char *));
if (filelist == (char **) NULL)
{
ThrowXWindowException(ResourceLimitError,"MemoryAllocationFailed",
diff --git a/magick/blob.c b/magick/blob.c
index 8ba3c35..3d60657 100644
--- a/magick/blob.c
+++ b/magick/blob.c
@@ -415,7 +415,7 @@
BlobInfo
*clone_info;
- clone_info=(BlobInfo *) AcquireMagickMemory(sizeof(*clone_info));
+ clone_info=(BlobInfo *) AcquireAlignedMemory(1,sizeof(*clone_info));
if (clone_info == (BlobInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
GetBlobInfo(clone_info);
diff --git a/magick/cipher.c b/magick/cipher.c
index 8c9f7e6..f1ad73c 100644
--- a/magick/cipher.c
+++ b/magick/cipher.c
@@ -190,7 +190,7 @@
AESInfo
*aes_info;
- aes_info=(AESInfo *) AcquireMagickMemory(sizeof(*aes_info));
+ aes_info=(AESInfo *) AcquireAlignedMemory(1,sizeof(*aes_info));
if (aes_info == (AESInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(aes_info,0,sizeof(*aes_info));
diff --git a/magick/coder.c b/magick/coder.c
index df81b6e..d7b2a85 100644
--- a/magick/coder.c
+++ b/magick/coder.c
@@ -780,7 +780,7 @@
/*
Coder element.
*/
- coder_info=(CoderInfo *) AcquireMagickMemory(sizeof(*coder_info));
+ coder_info=(CoderInfo *) AcquireAlignedMemory(1,sizeof(*coder_info));
if (coder_info == (CoderInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(coder_info,0,sizeof(*coder_info));
@@ -911,7 +911,7 @@
*p;
p=CoderMap+i;
- coder_info=(CoderInfo *) AcquireMagickMemory(sizeof(*coder_info));
+ coder_info=(CoderInfo *) AcquireAlignedMemory(1,sizeof(*coder_info));
if (coder_info == (CoderInfo *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
diff --git a/magick/color.c b/magick/color.c
index c1ad4e9..76fc71b 100644
--- a/magick/color.c
+++ b/magick/color.c
@@ -2035,7 +2035,7 @@
/*
Color element.
*/
- color_info=(ColorInfo *) AcquireMagickMemory(sizeof(*color_info));
+ color_info=(ColorInfo *) AcquireAlignedMemory(1,sizeof(*color_info));
if (color_info == (ColorInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(color_info,0,sizeof(*color_info));
@@ -2183,7 +2183,7 @@
*p;
p=ColorMap+i;
- color_info=(ColorInfo *) AcquireMagickMemory(sizeof(*color_info));
+ color_info=(ColorInfo *) AcquireAlignedMemory(1,sizeof(*color_info));
if (color_info == (ColorInfo *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
diff --git a/magick/compress.c b/magick/compress.c
index 60fa115..07b8422 100644
--- a/magick/compress.c
+++ b/magick/compress.c
@@ -274,7 +274,7 @@
Allocate image structure.
*/
if (image->ascii85 == (Ascii85Info *) NULL)
- image->ascii85=(Ascii85Info *) AcquireMagickMemory(sizeof(*image->ascii85));
+ image->ascii85=(Ascii85Info *) AcquireAlignedMemory(1,sizeof(*image->ascii85));
if (image->ascii85 == (Ascii85Info *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(image->ascii85,0,sizeof(*image->ascii85));
diff --git a/magick/deprecate.c b/magick/deprecate.c
index 0b90a30..ece228f 100644
--- a/magick/deprecate.c
+++ b/magick/deprecate.c
@@ -2339,7 +2339,7 @@
if (attribute != (const ImageAttribute *) NULL)
return(attribute);
}
- attribute=(ImageAttribute *) AcquireMagickMemory(sizeof(*attribute));
+ attribute=(ImageAttribute *) AcquireAlignedMemory(1,sizeof(*attribute));
if (attribute == (ImageAttribute *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(attribute,0,sizeof(*attribute));
diff --git a/magick/display.c b/magick/display.c
index 7bc1af7..7bb0463 100644
--- a/magick/display.c
+++ b/magick/display.c
@@ -2233,7 +2233,7 @@
/*
Initialize annotate structure.
*/
- annotate_info=(XAnnotateInfo *) AcquireMagickMemory(sizeof(*annotate_info));
+ annotate_info=(XAnnotateInfo *) AcquireAlignedMemory(1,sizeof(*annotate_info));
if (annotate_info == (XAnnotateInfo *) NULL)
return(MagickFalse);
XGetAnnotateInfo(annotate_info);
@@ -13421,7 +13421,7 @@
/*
Expand the filenames.
*/
- filelist=(char **) AcquireMagickMemory(sizeof(*filelist));
+ filelist=(char **) AcquireAlignedMemory(1,sizeof(*filelist));
if (filelist == (char **) NULL)
{
ThrowXWindowFatalException(ResourceLimitError,"MemoryAllocationFailed",
diff --git a/magick/draw.c b/magick/draw.c
index ae5cceb..9458ea4 100644
--- a/magick/draw.c
+++ b/magick/draw.c
@@ -196,7 +196,7 @@
DrawInfo
*draw_info;
- draw_info=(DrawInfo *) AcquireMagickMemory(sizeof(*draw_info));
+ draw_info=(DrawInfo *) AcquireAlignedMemory(1,sizeof(*draw_info));
if (draw_info == (DrawInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
GetDrawInfo((ImageInfo *) NULL,draw_info);
@@ -236,7 +236,7 @@
DrawInfo
*clone_info;
- clone_info=(DrawInfo *) AcquireMagickMemory(sizeof(*clone_info));
+ clone_info=(DrawInfo *) AcquireAlignedMemory(1,sizeof(*clone_info));
if (clone_info == (DrawInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
GetDrawInfo(image_info,clone_info);
@@ -478,7 +478,7 @@
/*
Convert a path to the more efficient sorted rendering form.
*/
- polygon_info=(PolygonInfo *) AcquireMagickMemory(sizeof(*polygon_info));
+ polygon_info=(PolygonInfo *) AcquireAlignedMemory(1,sizeof(*polygon_info));
if (polygon_info == (PolygonInfo *) NULL)
return((PolygonInfo *) NULL);
number_edges=16;
@@ -1764,7 +1764,7 @@
/*
Allocate primitive info memory.
*/
- graphic_context=(DrawInfo **) AcquireMagickMemory(sizeof(*graphic_context));
+ graphic_context=(DrawInfo **) AcquireAlignedMemory(1,sizeof(*graphic_context));
if (graphic_context == (DrawInfo **) NULL)
{
primitive=DestroyString(primitive);
diff --git a/magick/exception.c b/magick/exception.c
index 9be7f68..0e46466 100644
--- a/magick/exception.c
+++ b/magick/exception.c
@@ -103,7 +103,7 @@
ExceptionInfo
*exception;
- exception=(ExceptionInfo *) AcquireMagickMemory(sizeof(*exception));
+ exception=(ExceptionInfo *) AcquireAlignedMemory(1,sizeof(*exception));
if (exception == (ExceptionInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
GetExceptionInfo(exception);
@@ -875,7 +875,7 @@
(LocaleCompare(exception->reason,reason) == 0) &&
(LocaleCompare(exception->description,description) == 0))
return(MagickTrue);
- p=(ExceptionInfo *) AcquireMagickMemory(sizeof(*p));
+ p=(ExceptionInfo *) AcquireAlignedMemory(1,sizeof(*p));
if (p == (ExceptionInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(p,0,sizeof(*p));
diff --git a/magick/fx.c b/magick/fx.c
index fbe60f6..4cf1778 100644
--- a/magick/fx.c
+++ b/magick/fx.c
@@ -158,7 +158,7 @@
register long
i;
- fx_info=(FxInfo *) AcquireMagickMemory(sizeof(*fx_info));
+ fx_info=(FxInfo *) AcquireAlignedMemory(1,sizeof(*fx_info));
if (fx_info == (FxInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(fx_info,0,sizeof(*fx_info));
diff --git a/magick/hashmap.c b/magick/hashmap.c
index 690ab76..db4d8e9 100644
--- a/magick/hashmap.c
+++ b/magick/hashmap.c
@@ -165,7 +165,7 @@
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
if (list_info->elements == list_info->capacity)
return(MagickFalse);
- next=(ElementInfo *) AcquireMagickMemory(sizeof(*next));
+ next=(ElementInfo *) AcquireAlignedMemory(1,sizeof(*next));
if (next == (ElementInfo *) NULL)
return(MagickFalse);
next->value=(void *) value;
@@ -1035,7 +1035,7 @@
if ((index > list_info->elements) ||
(list_info->elements == list_info->capacity))
return(MagickFalse);
- next=(ElementInfo *) AcquireMagickMemory(sizeof(*next));
+ next=(ElementInfo *) AcquireAlignedMemory(1,sizeof(*next));
if (next == (ElementInfo *) NULL)
return(MagickFalse);
next->value=(void *) value;
@@ -1142,7 +1142,7 @@
return(MagickFalse);
if (list_info->elements == list_info->capacity)
return(MagickFalse);
- next=(ElementInfo *) AcquireMagickMemory(sizeof(*next));
+ next=(ElementInfo *) AcquireAlignedMemory(1,sizeof(*next));
if (next == (ElementInfo *) NULL)
return(MagickFalse);
next->value=(void *) value;
@@ -1350,7 +1350,7 @@
HashmapInfo
*hashmap_info;
- hashmap_info=(HashmapInfo *) AcquireMagickMemory(sizeof(*hashmap_info));
+ hashmap_info=(HashmapInfo *) AcquireAlignedMemory(1,sizeof(*hashmap_info));
if (hashmap_info == (HashmapInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(hashmap_info,0,sizeof(*hashmap_info));
@@ -1406,7 +1406,7 @@
LinkedListInfo
*list_info;
- list_info=(LinkedListInfo *) AcquireMagickMemory(sizeof(*list_info));
+ list_info=(LinkedListInfo *) AcquireAlignedMemory(1,sizeof(*list_info));
if (list_info == (LinkedListInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(list_info,0,sizeof(*list_info));
@@ -1551,7 +1551,7 @@
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
if ((key == (void *) NULL) || (value == (void *) NULL))
return(MagickFalse);
- next=(EntryInfo *) AcquireMagickMemory(sizeof(*next));
+ next=(EntryInfo *) AcquireAlignedMemory(1,sizeof(*next));
if (next == (EntryInfo *) NULL)
return(MagickFalse);
(void) LockSemaphoreInfo(hashmap_info->semaphore);
diff --git a/magick/histogram.c b/magick/histogram.c
index 8539606..94c1984 100644
--- a/magick/histogram.c
+++ b/magick/histogram.c
@@ -480,7 +480,7 @@
/*
Initialize tree to describe color cube.
*/
- cube_info=(CubeInfo *) AcquireMagickMemory(sizeof(*cube_info));
+ cube_info=(CubeInfo *) AcquireAlignedMemory(1,sizeof(*cube_info));
if (cube_info == (CubeInfo *) NULL)
return((CubeInfo *) NULL);
(void) ResetMagickMemory(cube_info,0,sizeof(*cube_info));
@@ -591,7 +591,7 @@
/*
Allocate a new nodes of nodes.
*/
- nodes=(Nodes *) AcquireMagickMemory(sizeof(*nodes));
+ nodes=(Nodes *) AcquireAlignedMemory(1,sizeof(*nodes));
if (nodes == (Nodes *) NULL)
return((NodeInfo *) NULL);
nodes->next=cube_info->node_queue;
diff --git a/magick/image.c b/magick/image.c
index 5a7692b..e2cbfac 100644
--- a/magick/image.c
+++ b/magick/image.c
@@ -153,7 +153,7 @@
Allocate image structure.
*/
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
- image=(Image *) AcquireMagickMemory(sizeof(*image));
+ image=(Image *) AcquireAlignedMemory(1,sizeof(*image));
if (image == (Image *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(image,0,sizeof(*image));
@@ -369,7 +369,7 @@
ImageInfo
*image_info;
- image_info=(ImageInfo *) AcquireMagickMemory(sizeof(*image_info));
+ image_info=(ImageInfo *) AcquireAlignedMemory(1,sizeof(*image_info));
if (image_info == (ImageInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
GetImageInfo(image_info);
@@ -820,7 +820,7 @@
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
- clone_image=(Image *) AcquireMagickMemory(sizeof(*clone_image));
+ clone_image=(Image *) AcquireAlignedMemory(1,sizeof(*clone_image));
if (clone_image == (Image *) NULL)
ThrowImageException(ResourceLimitError,"MemoryAllocationFailed");
(void) ResetMagickMemory(clone_image,0,sizeof(*clone_image));
diff --git a/magick/locale.c b/magick/locale.c
index 25fa05e..d5c4fba 100644
--- a/magick/locale.c
+++ b/magick/locale.c
@@ -918,7 +918,7 @@
while ((isspace((int) ((unsigned char) *q)) != 0) && (q > p))
q--;
(void) CopyMagickString(message,p,(size_t) (q-p+2));
- locale_info=(LocaleInfo *) AcquireMagickMemory(sizeof(*locale_info));
+ locale_info=(LocaleInfo *) AcquireAlignedMemory(1,sizeof(*locale_info));
if (locale_info == (LocaleInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(locale_info,0,sizeof(*locale_info));
diff --git a/magick/log.c b/magick/log.c
index cf8f2ee..6b17249 100644
--- a/magick/log.c
+++ b/magick/log.c
@@ -1378,7 +1378,7 @@
/*
Allocate memory for the log list.
*/
- log_info=(LogInfo *) AcquireMagickMemory(sizeof(*log_info));
+ log_info=(LogInfo *) AcquireAlignedMemory(1,sizeof(*log_info));
if (log_info == (LogInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(log_info,0,sizeof(*log_info));
@@ -1552,7 +1552,7 @@
*p;
p=LogMap+i;
- log_info=(LogInfo *) AcquireMagickMemory(sizeof(*log_info));
+ log_info=(LogInfo *) AcquireAlignedMemory(1,sizeof(*log_info));
if (log_info == (LogInfo *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
diff --git a/magick/mac.c b/magick/mac.c
index 71d0392..126753f 100644
--- a/magick/mac.c
+++ b/magick/mac.c
@@ -1028,7 +1028,7 @@
errno=error;
return((DIR *) NULL);
}
- entry=(DIR *) AcquireMagickMemory(sizeof(DIR));
+ entry=(DIR *) AcquireAlignedMemory(1,sizeof(DIR));
if (entry == (DIR *) NULL)
return((DIR *) NULL);
entry->d_VRefNum=search_info.hFileInfo.ioVRefNum;
diff --git a/magick/magic.c b/magick/magic.c
index 415d516..25b1bff 100644
--- a/magick/magic.c
+++ b/magick/magic.c
@@ -762,7 +762,7 @@
/*
Magic element.
*/
- magic_info=(MagicInfo *) AcquireMagickMemory(sizeof(*magic_info));
+ magic_info=(MagicInfo *) AcquireAlignedMemory(1,sizeof(*magic_info));
if (magic_info == (MagicInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(magic_info,0,sizeof(*magic_info));
@@ -954,7 +954,7 @@
*p;
p=MagicMap+i;
- magic_info=(MagicInfo *) AcquireMagickMemory(sizeof(*magic_info));
+ magic_info=(MagicInfo *) AcquireAlignedMemory(1,sizeof(*magic_info));
if (magic_info == (MagicInfo *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
diff --git a/magick/magick.c b/magick/magick.c
index a4e0db9..fb5681f 100644
--- a/magick/magick.c
+++ b/magick/magick.c
@@ -1414,7 +1414,7 @@
assert(name != (const char *) NULL);
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",name);
- magick_info=(MagickInfo *) AcquireMagickMemory(sizeof(*magick_info));
+ magick_info=(MagickInfo *) AcquireAlignedMemory(1,sizeof(*magick_info));
if (magick_info == (MagickInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(magick_info,0,sizeof(*magick_info));
diff --git a/magick/mime.c b/magick/mime.c
index c0b2b6a..bb8a0a3 100644
--- a/magick/mime.c
+++ b/magick/mime.c
@@ -814,7 +814,7 @@
/*
Process mime element.
*/
- mime_info=(MimeInfo *) AcquireMagickMemory(sizeof(*mime_info));
+ mime_info=(MimeInfo *) AcquireAlignedMemory(1,sizeof(*mime_info));
if (mime_info == (MimeInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(mime_info,0,sizeof(*mime_info));
diff --git a/magick/module.c b/magick/module.c
index 6f049f9..35157b3 100644
--- a/magick/module.c
+++ b/magick/module.c
@@ -138,7 +138,7 @@
ModuleInfo
*module_info;
- module_info=(ModuleInfo *) AcquireMagickMemory(sizeof(*module_info));
+ module_info=(ModuleInfo *) AcquireAlignedMemory(1,sizeof(*module_info));
if (module_info == (ModuleInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(module_info,0,sizeof(*module_info));
@@ -447,7 +447,7 @@
modules=(char **) RelinquishMagickMemory(modules);
return((char **) NULL);
}
- buffer=(struct dirent *) AcquireMagickMemory(sizeof(*buffer)+FILENAME_MAX+1);
+ buffer=(struct dirent *) AcquireAlignedMemory(1,sizeof(*buffer)+FILENAME_MAX+1);
if (buffer == (struct dirent *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
i=0;
diff --git a/magick/montage.c b/magick/montage.c
index 1884b57..5b8a929 100644
--- a/magick/montage.c
+++ b/magick/montage.c
@@ -104,7 +104,7 @@
MontageInfo
*clone_info;
- clone_info=(MontageInfo *) AcquireMagickMemory(sizeof(*clone_info));
+ clone_info=(MontageInfo *) AcquireAlignedMemory(1,sizeof(*clone_info));
if (clone_info == (MontageInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
GetMontageInfo(image_info,clone_info);
diff --git a/magick/nt-base.c b/magick/nt-base.c
index 4e1aa7d..7994770 100644
--- a/magick/nt-base.c
+++ b/magick/nt-base.c
@@ -1313,7 +1313,7 @@
MaxTextExtent);
if (length >= MaxTextExtent)
return((DIR *) NULL);
- entry=(DIR *) AcquireMagickMemory(sizeof(DIR));
+ entry=(DIR *) AcquireAlignedMemory(1,sizeof(DIR));
if (entry != (DIR *) NULL)
{
entry->firsttime=TRUE;
diff --git a/magick/nt-feature.c b/magick/nt-feature.c
index 7f15539..0b6bda9 100644
--- a/magick/nt-feature.c
+++ b/magick/nt-feature.c
@@ -382,7 +382,7 @@
continue;
*pos='\0'; /* Remove (TrueType) from string */
- type_info=(TypeInfo *) AcquireMagickMemory(sizeof(*type_info));
+ type_info=(TypeInfo *) AcquireAlignedMemory(1,sizeof(*type_info));
if (type_info == (TypeInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(type_info,0,sizeof(TypeInfo));
diff --git a/magick/pixel-private.h b/magick/pixel-private.h
index 36e2cd0..a3a5ee6 100644
--- a/magick/pixel-private.h
+++ b/magick/pixel-private.h
@@ -34,7 +34,7 @@
MagickPixelPacket
*clone_pixel;
- clone_pixel=(MagickPixelPacket *) AcquireMagickMemory(sizeof(*clone_pixel));
+ clone_pixel=(MagickPixelPacket *) AcquireAlignedMemory(1,sizeof(*clone_pixel));
if (clone_pixel == (MagickPixelPacket *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
*clone_pixel=(*pixel);
diff --git a/magick/policy.c b/magick/policy.c
index 0485af0..02a2915 100644
--- a/magick/policy.c
+++ b/magick/policy.c
@@ -746,7 +746,7 @@
/*
Policy element.
*/
- policy_info=(PolicyInfo *) AcquireMagickMemory(sizeof(*policy_info));
+ policy_info=(PolicyInfo *) AcquireAlignedMemory(1,sizeof(*policy_info));
if (policy_info == (PolicyInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(policy_info,0,sizeof(*policy_info));
@@ -907,7 +907,7 @@
*p;
p=PolicyMap+i;
- policy_info=(PolicyInfo *) AcquireMagickMemory(sizeof(*policy_info));
+ policy_info=(PolicyInfo *) AcquireAlignedMemory(1,sizeof(*policy_info));
if (policy_info == (PolicyInfo *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
diff --git a/magick/quantize.c b/magick/quantize.c
index 7b1510d..97c2432 100644
--- a/magick/quantize.c
+++ b/magick/quantize.c
@@ -361,7 +361,7 @@
QuantizeInfo
*quantize_info;
- quantize_info=(QuantizeInfo *) AcquireMagickMemory(sizeof(*quantize_info));
+ quantize_info=(QuantizeInfo *) AcquireAlignedMemory(1,sizeof(*quantize_info));
if (quantize_info == (QuantizeInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
GetQuantizeInfo(quantize_info);
@@ -969,7 +969,7 @@
QuantizeInfo
*clone_info;
- clone_info=(QuantizeInfo *) AcquireMagickMemory(sizeof(*clone_info));
+ clone_info=(QuantizeInfo *) AcquireAlignedMemory(1,sizeof(*clone_info));
if (clone_info == (QuantizeInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
GetQuantizeInfo(clone_info);
@@ -1842,7 +1842,7 @@
/*
Initialize tree to describe color cube_info.
*/
- cube_info=(CubeInfo *) AcquireMagickMemory(sizeof(*cube_info));
+ cube_info=(CubeInfo *) AcquireAlignedMemory(1,sizeof(*cube_info));
if (cube_info == (CubeInfo *) NULL)
return((CubeInfo *) NULL);
(void) ResetMagickMemory(cube_info,0,sizeof(*cube_info));
@@ -1942,7 +1942,7 @@
/*
Allocate a new queue of nodes.
*/
- nodes=(Nodes *) AcquireMagickMemory(sizeof(*nodes));
+ nodes=(Nodes *) AcquireAlignedMemory(1,sizeof(*nodes));
if (nodes == (Nodes *) NULL)
return((NodeInfo *) NULL);
nodes->nodes=(NodeInfo *) AcquireQuantumMemory(NodesInAList,
diff --git a/magick/quantum.c b/magick/quantum.c
index 3233728..32fedc5 100644
--- a/magick/quantum.c
+++ b/magick/quantum.c
@@ -119,7 +119,7 @@
QuantumInfo
*quantum_info;
- quantum_info=(QuantumInfo *) AcquireMagickMemory(sizeof(*quantum_info));
+ quantum_info=(QuantumInfo *) AcquireAlignedMemory(1,sizeof(*quantum_info));
if (quantum_info == (QuantumInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
quantum_info->signature=MagickSignature;
diff --git a/magick/registry.c b/magick/registry.c
index 3f24800..f74bbc8 100644
--- a/magick/registry.c
+++ b/magick/registry.c
@@ -514,7 +514,7 @@
}
if (clone_value == (void *) NULL)
return(MagickFalse);
- registry_info=(RegistryInfo *) AcquireMagickMemory(sizeof(*registry_info));
+ registry_info=(RegistryInfo *) AcquireAlignedMemory(1,sizeof(*registry_info));
if (registry_info == (RegistryInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(registry_info,0,sizeof(*registry_info));
diff --git a/magick/resize.c b/magick/resize.c
index 4695d80..8f4d19f 100644
--- a/magick/resize.c
+++ b/magick/resize.c
@@ -583,7 +583,7 @@
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
- resize_filter=(ResizeFilter *) AcquireMagickMemory(sizeof(*resize_filter));
+ resize_filter=(ResizeFilter *) AcquireAlignedMemory(1,sizeof(*resize_filter));
if (resize_filter == (ResizeFilter *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
diff --git a/magick/segment.c b/magick/segment.c
index c42227e..eea376f 100644
--- a/magick/segment.c
+++ b/magick/segment.c
@@ -305,7 +305,7 @@
}
else
{
- cluster=(Cluster *) AcquireMagickMemory(sizeof(*cluster));
+ cluster=(Cluster *) AcquireAlignedMemory(1,sizeof(*cluster));
head=cluster;
}
if (cluster == (Cluster *) NULL)
@@ -327,7 +327,7 @@
/*
No classes were identified-- create one.
*/
- cluster=(Cluster *) AcquireMagickMemory(sizeof(*cluster));
+ cluster=(Cluster *) AcquireAlignedMemory(1,sizeof(*cluster));
if (cluster == (Cluster *) NULL)
ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",
image->filename);
@@ -1035,7 +1035,7 @@
}
else
{
- cluster=(Cluster *) AcquireMagickMemory(sizeof(*cluster));
+ cluster=(Cluster *) AcquireAlignedMemory(1,sizeof(*cluster));
head=cluster;
}
if (cluster == (Cluster *) NULL)
@@ -1061,7 +1061,7 @@
/*
No classes were identified-- create one.
*/
- cluster=(Cluster *) AcquireMagickMemory(sizeof(*cluster));
+ cluster=(Cluster *) AcquireAlignedMemory(1,sizeof(*cluster));
if (cluster == (Cluster *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
@@ -1370,7 +1370,7 @@
/*
The root is the entire histogram.
*/
- root=(IntervalTree *) AcquireMagickMemory(sizeof(*root));
+ root=(IntervalTree *) AcquireAlignedMemory(1,sizeof(*root));
root->child=(IntervalTree *) NULL;
root->sibling=(IntervalTree *) NULL;
root->tau=0.0;
diff --git a/magick/shear.c b/magick/shear.c
index a3b1f12..705a26c 100644
--- a/magick/shear.c
+++ b/magick/shear.c
@@ -368,7 +368,7 @@
RadonInfo
*radon_info;
- radon_info=(RadonInfo *) AcquireMagickMemory(sizeof(*radon_info));
+ radon_info=(RadonInfo *) AcquireAlignedMemory(1,sizeof(*radon_info));
if (radon_info == (RadonInfo *) NULL)
return((RadonInfo *) NULL);
(void) ResetMagickMemory(radon_info,0,sizeof(*radon_info));
diff --git a/magick/signature.c b/magick/signature.c
index dd1a007..9e957b4 100644
--- a/magick/signature.c
+++ b/magick/signature.c
@@ -120,7 +120,7 @@
unsigned int
lsb_first;
- signature_info=(SignatureInfo *) AcquireMagickMemory(sizeof(*signature_info));
+ signature_info=(SignatureInfo *) AcquireAlignedMemory(1,sizeof(*signature_info));
if (signature_info == (SignatureInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(signature_info,0,sizeof(*signature_info));
diff --git a/magick/splay-tree.c b/magick/splay-tree.c
index 6b92d84..94ef088 100644
--- a/magick/splay-tree.c
+++ b/magick/splay-tree.c
@@ -182,7 +182,7 @@
return(MagickTrue);
}
}
- node=(NodeInfo *) AcquireMagickMemory(sizeof(*node));
+ node=(NodeInfo *) AcquireAlignedMemory(1,sizeof(*node));
if (node == (NodeInfo *) NULL)
{
(void) UnlockSemaphoreInfo(splay_tree->semaphore);
@@ -1127,7 +1127,7 @@
SplayTreeInfo
*splay_tree;
- splay_tree=(SplayTreeInfo *) AcquireMagickMemory(sizeof(*splay_tree));
+ splay_tree=(SplayTreeInfo *) AcquireAlignedMemory(1,sizeof(*splay_tree));
if (splay_tree == (SplayTreeInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(splay_tree,0,sizeof(*splay_tree));
diff --git a/magick/stream.c b/magick/stream.c
index 4131154..5508bf2 100644
--- a/magick/stream.c
+++ b/magick/stream.c
@@ -151,7 +151,7 @@
StreamInfo
*stream_info;
- stream_info=(StreamInfo *) AcquireMagickMemory(sizeof(*stream_info));
+ stream_info=(StreamInfo *) AcquireAlignedMemory(1,sizeof(*stream_info));
if (stream_info == (StreamInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(stream_info,0,sizeof(*stream_info));
diff --git a/magick/string.c b/magick/string.c
index 6ff5885..98df848 100644
--- a/magick/string.c
+++ b/magick/string.c
@@ -157,7 +157,7 @@
StringInfo
*string_info;
- string_info=(StringInfo *) AcquireMagickMemory(sizeof(*string_info));
+ string_info=(StringInfo *) AcquireAlignedMemory(1,sizeof(*string_info));
if (string_info == (StringInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(string_info,0,sizeof(*string_info));
diff --git a/magick/thread.c b/magick/thread.c
index 1514be3..6de531b 100644
--- a/magick/thread.c
+++ b/magick/thread.c
@@ -69,7 +69,7 @@
*key=TlsAlloc();
return(*key != TLS_OUT_OF_INDEXES ? MagickTrue : MagickFalse);
#else
- *key=AcquireMagickMemory(sizeof(key));
+ *key=AcquireAlignedMemory(1,sizeof(key));
return(*key != (void *) NULL ? MagickTrue : MagickFalse);
#endif
}
diff --git a/magick/threshold.c b/magick/threshold.c
index cf94977..7f149ee 100644
--- a/magick/threshold.c
+++ b/magick/threshold.c
@@ -923,7 +923,7 @@
}
/* The map has been found -- Allocate a Threshold Map to return */
- map = (ThresholdMap *)AcquireMagickMemory(sizeof(ThresholdMap));
+ map = (ThresholdMap *)AcquireAlignedMemory(1,sizeof(ThresholdMap));
if ( map == (ThresholdMap *)NULL )
ThrowFatalException(ResourceLimitFatalError,"UnableToAcquireThresholdMap");
map->map_id = (char *)NULL;
diff --git a/magick/timer.c b/magick/timer.c
index d003bbc..4adc2d2 100644
--- a/magick/timer.c
+++ b/magick/timer.c
@@ -90,7 +90,7 @@
TimerInfo
*timer_info;
- timer_info=(TimerInfo *) AcquireMagickMemory(sizeof(*timer_info));
+ timer_info=(TimerInfo *) AcquireAlignedMemory(1,sizeof(*timer_info));
if (timer_info == (TimerInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"UnableToAcquireString");
(void) ResetMagickMemory(timer_info,0,sizeof(*timer_info));
diff --git a/magick/token.c b/magick/token.c
index 2f443d5..c2fcc14 100644
--- a/magick/token.c
+++ b/magick/token.c
@@ -94,7 +94,7 @@
TokenInfo
*token_info;
- token_info=(TokenInfo *) AcquireMagickMemory(sizeof(*token_info));
+ token_info=(TokenInfo *) AcquireAlignedMemory(1,sizeof(*token_info));
if (token_info == (TokenInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
token_info->signature=MagickSignature;
diff --git a/magick/type.c b/magick/type.c
index 1b097dc..a79ed24 100644
--- a/magick/type.c
+++ b/magick/type.c
@@ -694,7 +694,7 @@
GetPathComponent((const char *) file,ExtensionPath,extension);
if ((*extension != '\0') && (LocaleCompare(extension,"gz") == 0))
continue;
- type_info=(TypeInfo *) AcquireMagickMemory(sizeof(*type_info));
+ type_info=(TypeInfo *) AcquireAlignedMemory(1,sizeof(*type_info));
if (type_info == (TypeInfo *) NULL)
continue;
(void) ResetMagickMemory(type_info,0,sizeof(*type_info));
@@ -1062,7 +1062,7 @@
/*
Type element.
*/
- type_info=(TypeInfo *) AcquireMagickMemory(sizeof(*type_info));
+ type_info=(TypeInfo *) AcquireAlignedMemory(1,sizeof(*type_info));
if (type_info == (TypeInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(type_info,0,sizeof(*type_info));
diff --git a/magick/utility.c b/magick/utility.c
index 105d871..c8963cd 100644
--- a/magick/utility.c
+++ b/magick/utility.c
@@ -1673,7 +1673,7 @@
/*
Save the current and change to the new directory.
*/
- buffer=(struct dirent *) AcquireMagickMemory(sizeof(*buffer)+FILENAME_MAX+1);
+ buffer=(struct dirent *) AcquireAlignedMemory(1,sizeof(*buffer)+FILENAME_MAX+1);
if (buffer == (struct dirent *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
while ((MagickReadDirectory(current_directory,buffer,&entry) == 0) &&
diff --git a/magick/version.h b/magick/version.h
index 976c74d..470597e 100644
--- a/magick/version.h
+++ b/magick/version.h
@@ -31,7 +31,7 @@
#define MagickLibVersionText "6.5.8"
#define MagickLibVersionNumber 2,0,1
#define MagickLibSubversion "-6"
-#define MagickReleaseDate "2009-12-11"
+#define MagickReleaseDate "2009-12-12"
#define MagickChangeDate "20091209"
#define MagickAuthoritativeURL "http://www.imagemagick.org"
#define MagickHomeURL "file:///usr/local/share/doc/ImageMagick-6.5.8/index.html"
diff --git a/magick/vms.c b/magick/vms.c
index d3c836f..150e544 100644
--- a/magick/vms.c
+++ b/magick/vms.c
@@ -111,7 +111,7 @@
/*
Allocate memory for handle and the pattern.
*/
- directory=(DIR *) AcquireMagickMemory(sizeof(DIR));
+ directory=(DIR *) AcquireAlignedMemory(1,sizeof(DIR));
if (directory == (DIR *) NULL)
{
errno=ENOMEM;
diff --git a/magick/xml-tree.c b/magick/xml-tree.c
index e8faf8f..a9b6fd9 100644
--- a/magick/xml-tree.c
+++ b/magick/xml-tree.c
@@ -165,7 +165,7 @@
if (xml_info == (XMLTreeInfo *) NULL)
return((XMLTreeInfo *) NULL);
- child=(XMLTreeInfo *) AcquireMagickMemory(sizeof(*child));
+ child=(XMLTreeInfo *) AcquireAlignedMemory(1,sizeof(*child));
if (child == (XMLTreeInfo *) NULL)
return((XMLTreeInfo *) NULL);
(void) ResetMagickMemory(child,0,sizeof(*child));
@@ -1460,7 +1460,7 @@
}
if (root->processing_instructions[0] == (char **) NULL)
{
- root->processing_instructions=(char ***) AcquireMagickMemory(sizeof(
+ root->processing_instructions=(char ***) AcquireAlignedMemory(1,sizeof(
*root->processing_instructions));
if (root->processing_instructions ==(char ***) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
@@ -1526,7 +1526,7 @@
i;
n=(char *) NULL;
- predefined_entitites=(char **) AcquireMagickMemory(sizeof(sentinel));
+ predefined_entitites=(char **) AcquireAlignedMemory(1,sizeof(sentinel));
if (predefined_entitites == (char **) NULL)
ThrowFatalException(ResourceLimitError,"MemoryAllocationFailed");
(void) CopyMagickMemory(predefined_entitites,sentinel,sizeof(sentinel));
@@ -2125,7 +2125,7 @@
XMLTreeRoot
*root;
- root=(XMLTreeRoot *) AcquireMagickMemory(sizeof(*root));
+ root=(XMLTreeRoot *) AcquireAlignedMemory(1,sizeof(*root));
if (root == (XMLTreeRoot *) NULL)
return((XMLTreeInfo *) NULL);
(void) ResetMagickMemory(root,0,sizeof(*root));
@@ -2134,7 +2134,7 @@
root->root.tag=ConstantString(tag);
root->node=(&root->root);
root->root.content=ConstantString("");
- root->entities=(char **) AcquireMagickMemory(sizeof(predefined_entities));
+ root->entities=(char **) AcquireAlignedMemory(1,sizeof(predefined_entities));
if (root->entities == (char **) NULL)
return((XMLTreeInfo *) NULL);
(void) CopyMagickMemory(root->entities,predefined_entities,
diff --git a/magick/xwindow.c b/magick/xwindow.c
index 7eb7dd8..a7b9aa6 100644
--- a/magick/xwindow.c
+++ b/magick/xwindow.c
@@ -4291,7 +4291,7 @@
/*
Append colormap to colormap list.
*/
- p=(ColormapInfo *) AcquireMagickMemory(sizeof(*p));
+ p=(ColormapInfo *) AcquireAlignedMemory(1,sizeof(*p));
if (p == (ColormapInfo *) NULL)
return((Image *) NULL);
p->colormap=window_info[id].colormap;
@@ -5104,7 +5104,7 @@
/*
Allocate windows structure.
*/
- windows=(XWindows *) AcquireMagickMemory(sizeof(*windows));
+ windows=(XWindows *) AcquireAlignedMemory(1,sizeof(*windows));
if (windows == (XWindows *) NULL)
{
ThrowXWindowFatalException(XServerFatalError,"MemoryAllocationFailed",
diff --git a/wand/deprecate.c b/wand/deprecate.c
index cd0aa09..660c6a6 100644
--- a/wand/deprecate.c
+++ b/wand/deprecate.c
@@ -430,7 +430,7 @@
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- clone_wand=(MagickWand *) AcquireMagickMemory(sizeof(*clone_wand));
+ clone_wand=(MagickWand *) AcquireAlignedMemory(1,sizeof(*clone_wand));
if (clone_wand == (MagickWand *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
images->filename);
diff --git a/wand/drawing-wand.c b/wand/drawing-wand.c
index d66b579..adb3b6f 100644
--- a/wand/drawing-wand.c
+++ b/wand/drawing-wand.c
@@ -555,7 +555,7 @@
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- clone_wand=(DrawingWand *) AcquireMagickMemory(sizeof(*clone_wand));
+ clone_wand=(DrawingWand *) AcquireAlignedMemory(1,sizeof(*clone_wand));
if (clone_wand == (DrawingWand *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,
"MemoryAllocationFailed",GetExceptionMessage(errno));
@@ -6571,7 +6571,7 @@
quantum=GetMagickQuantumDepth(&depth);
if (depth != MAGICKCORE_QUANTUM_DEPTH)
ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum);
- wand=(DrawingWand *) AcquireMagickMemory(sizeof(*wand));
+ wand=(DrawingWand *) AcquireAlignedMemory(1,sizeof(*wand));
if (wand == (DrawingWand *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
@@ -6592,7 +6592,7 @@
wand->pattern_bounds.width=0;
wand->pattern_bounds.height=0;
wand->index=0;
- wand->graphic_context=(DrawInfo **) AcquireMagickMemory(sizeof(
+ wand->graphic_context=(DrawInfo **) AcquireAlignedMemory(1,sizeof(
*wand->graphic_context));
if (wand->graphic_context == (DrawInfo **) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
diff --git a/wand/magick-image.c b/wand/magick-image.c
index 6af2a5b..91334d5 100644
--- a/wand/magick-image.c
+++ b/wand/magick-image.c
@@ -99,7 +99,7 @@
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- clone_wand=(MagickWand *) AcquireMagickMemory(sizeof(*clone_wand));
+ clone_wand=(MagickWand *) AcquireAlignedMemory(1,sizeof(*clone_wand));
if (clone_wand == (MagickWand *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
images->filename);
diff --git a/wand/magick-wand.c b/wand/magick-wand.c
index 81d26c4..82f6ce8 100644
--- a/wand/magick-wand.c
+++ b/wand/magick-wand.c
@@ -129,7 +129,7 @@
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- clone_wand=(MagickWand *) AcquireMagickMemory(sizeof(*clone_wand));
+ clone_wand=(MagickWand *) AcquireAlignedMemory(1,sizeof(*clone_wand));
if (clone_wand == (MagickWand *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
wand->name);
@@ -1028,7 +1028,7 @@
quantum=GetMagickQuantumDepth(&depth);
if (depth != MAGICKCORE_QUANTUM_DEPTH)
ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum);
- wand=(MagickWand *) AcquireMagickMemory(sizeof(*wand));
+ wand=(MagickWand *) AcquireAlignedMemory(1,sizeof(*wand));
if (wand == (MagickWand *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
diff --git a/wand/pixel-iterator.c b/wand/pixel-iterator.c
index 9d2d4b6..e0f8cd1 100644
--- a/wand/pixel-iterator.c
+++ b/wand/pixel-iterator.c
@@ -162,7 +162,7 @@
assert(iterator->signature == WandSignature);
if (iterator->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
- clone_iterator=(PixelIterator *) AcquireMagickMemory(sizeof(*clone_iterator));
+ clone_iterator=(PixelIterator *) AcquireAlignedMemory(1,sizeof(*clone_iterator));
if (clone_iterator == (PixelIterator *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
iterator->name);
@@ -312,7 +312,7 @@
view=AcquireCacheView(image);
if (view == (CacheView *) NULL)
return((PixelIterator *) NULL);
- iterator=(PixelIterator *) AcquireMagickMemory(sizeof(*iterator));
+ iterator=(PixelIterator *) AcquireAlignedMemory(1,sizeof(*iterator));
if (iterator == (PixelIterator *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
@@ -427,7 +427,7 @@
view=AcquireCacheView(image);
if (view == (CacheView *) NULL)
return((PixelIterator *) NULL);
- iterator=(PixelIterator *) AcquireMagickMemory(sizeof(*iterator));
+ iterator=(PixelIterator *) AcquireAlignedMemory(1,sizeof(*iterator));
if (iterator == (PixelIterator *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
wand->name);
diff --git a/wand/pixel-view.c b/wand/pixel-view.c
index 9824936..de049e7 100644
--- a/wand/pixel-view.c
+++ b/wand/pixel-view.c
@@ -127,7 +127,7 @@
assert(pixel_view->signature == WandSignature);
if (pixel_view->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",pixel_view->name);
- clone_view=(PixelView *) AcquireMagickMemory(sizeof(*clone_view));
+ clone_view=(PixelView *) AcquireAlignedMemory(1,sizeof(*clone_view));
if (clone_view == (PixelView *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
pixel_view->name);
@@ -838,7 +838,7 @@
assert(wand != (MagickWand *) NULL);
assert(wand->signature == MagickSignature);
- pixel_view=(PixelView *) AcquireMagickMemory(sizeof(*pixel_view));
+ pixel_view=(PixelView *) AcquireAlignedMemory(1,sizeof(*pixel_view));
if (pixel_view == (PixelView *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
@@ -897,7 +897,7 @@
assert(wand != (MagickWand *) NULL);
assert(wand->signature == MagickSignature);
- pixel_view=(PixelView *) AcquireMagickMemory(sizeof(*pixel_view));
+ pixel_view=(PixelView *) AcquireAlignedMemory(1,sizeof(*pixel_view));
if (pixel_view == (PixelView *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
diff --git a/wand/pixel-wand.c b/wand/pixel-wand.c
index 4d7b4f4..af1d261 100644
--- a/wand/pixel-wand.c
+++ b/wand/pixel-wand.c
@@ -148,7 +148,7 @@
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- clone_wand=(PixelWand *) AcquireMagickMemory(sizeof(*clone_wand));
+ clone_wand=(PixelWand *) AcquireAlignedMemory(1,sizeof(*clone_wand));
if (clone_wand == (PixelWand *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
wand->name);
@@ -400,7 +400,7 @@
quantum=GetMagickQuantumDepth(&depth);
if (depth != MAGICKCORE_QUANTUM_DEPTH)
ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum);
- wand=(PixelWand *) AcquireMagickMemory(sizeof(*wand));
+ wand=(PixelWand *) AcquireAlignedMemory(1,sizeof(*wand));
if (wand == (PixelWand *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));