% July 1998 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
% written by Yoo C. Chung.
%
% By default, ANSI memory methods are called (e.g. malloc). Use the
-% custom memory allocator by defining MAGICKCORE_EMBEDDABLE_SUPPORT
+% custom memory allocator by defining MAGICKCORE_ZERO_CONFIGURATION_SUPPORT
% to allocate memory with private anonymous mapping rather than from the
% heap.
%
(DestroyMemoryHandler) free
};
-#if defined(MAGICKCORE_EMBEDDABLE_SUPPORT)
+#if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
static MemoryInfo
memory_info;
return(malloc(MagickMax(size,AlignedSize)));
}
\f
-#if defined(MAGICKCORE_EMBEDDABLE_SUPPORT)
+#if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
register void
*memory;
-#if !defined(MAGICKCORE_EMBEDDABLE_SUPPORT)
+#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
memory=memory_methods.acquire_memory_handler(size == 0 ? 1UL : size);
#else
if (memory_semaphore == (SemaphoreInfo *) NULL)
*/
MagickExport void DestroyMagickMemory(void)
{
-#if defined(MAGICKCORE_EMBEDDABLE_SUPPORT)
+#if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
register ssize_t
i;
#endif
}
\f
-#if defined(MAGICKCORE_EMBEDDABLE_SUPPORT)
+#if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
{
if (memory == (void *) NULL)
return((void *) NULL);
-#if !defined(MAGICKCORE_EMBEDDABLE_SUPPORT)
+#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
memory_methods.destroy_memory_handler(memory);
#else
+ LockSemaphoreInfo(memory_semaphore);
assert((SizeOfBlock(memory) % (4*sizeof(size_t))) == 0);
assert((*BlockHeader(NextBlock(memory)) & PreviousBlockBit) != 0);
- LockSemaphoreInfo(memory_semaphore);
if ((*BlockHeader(memory) & PreviousBlockBit) == 0)
{
void
%
*/
-#if defined(MAGICKCORE_EMBEDDABLE_SUPPORT)
+#if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
static inline void *ResizeBlock(void *block,size_t size)
{
register void
if (memory == (void *) NULL)
return(AcquireMagickMemory(size));
-#if !defined(MAGICKCORE_EMBEDDABLE_SUPPORT)
+#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
block=memory_methods.resize_memory_handler(memory,size == 0 ? 1UL : size);
if (block == (void *) NULL)
memory=RelinquishMagickMemory(memory);