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",