]> granicus.if.org Git - imagemagick/commitdiff
Do not enable anonymous memory support for --enable-zero-configuration option
authorCristy <urban-warrior@imagemagick.org>
Sun, 17 Jul 2016 12:21:18 +0000 (08:21 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sun, 17 Jul 2016 12:21:18 +0000 (08:21 -0400)
MagickCore/memory.c

index 47618a3265983a7cc8163fc7d1d4bee1e3a2f74a..5076cba85fe9e139a15569ebe03cc5a38b4ef8dd 100644 (file)
@@ -44,7 +44,7 @@
 %  written by Yoo C. Chung.
 %
 %  By default, ANSI memory methods are called (e.g. malloc).  Use the
-%  custom memory allocator by defining MAGICKCORE_ZERO_CONFIGURATION_SUPPORT
+%  custom memory allocator by defining MAGICKCORE_ANONYMOUS_MEMORY_SUPPORT
 %  to allocate memory with private anonymous mapping rather than from the
 %  heap.
 %
@@ -191,7 +191,7 @@ static MagickMemoryMethods
     (DestroyMemoryHandler) free
 #endif
   };
-#if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
+#if defined(MAGICKCORE_ANONYMOUS_MEMORY_SUPPORT)
 static MemoryPool
   memory_pool;
 
@@ -279,7 +279,7 @@ MagickExport void *AcquireAlignedMemory(const size_t count,const size_t quantum)
   return(memory);
 }
 \f
-#if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
+#if defined(MAGICKCORE_ANONYMOUS_MEMORY_SUPPORT)
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %                                                                             %
@@ -456,7 +456,7 @@ MagickExport void *AcquireMagickMemory(const size_t size)
   register void
     *memory;
 
-#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
+#if !defined(MAGICKCORE_ANONYMOUS_MEMORY_SUPPORT)
   memory=memory_methods.acquire_memory_handler(size == 0 ? 1UL : size);
 #else
   if (memory_semaphore == (SemaphoreInfo *) NULL)
@@ -727,7 +727,7 @@ MagickExport void *CopyMagickMemory(void *destination,const void *source,
 */
 MagickExport void DestroyMagickMemory(void)
 {
-#if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
+#if defined(MAGICKCORE_ANONYMOUS_MEMORY_SUPPORT)
   register ssize_t
     i;
 
@@ -748,7 +748,7 @@ MagickExport void DestroyMagickMemory(void)
 #endif
 }
 \f
-#if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
+#if defined(MAGICKCORE_ANONYMOUS_MEMORY_SUPPORT)
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %                                                                             %
@@ -998,7 +998,7 @@ MagickExport void *RelinquishMagickMemory(void *memory)
 {
   if (memory == (void *) NULL)
     return((void *) NULL);
-#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
+#if !defined(MAGICKCORE_ANONYMOUS_MEMORY_SUPPORT)
   memory_methods.destroy_memory_handler(memory);
 #else
   LockSemaphoreInfo(memory_semaphore);
@@ -1158,7 +1158,7 @@ MagickExport void *ResetMagickMemory(void *memory,int byte,const size_t size)
 %
 */
 
-#if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
+#if defined(MAGICKCORE_ANONYMOUS_MEMORY_SUPPORT)
 static inline void *ResizeBlock(void *block,size_t size)
 {
   register void
@@ -1185,7 +1185,7 @@ MagickExport void *ResizeMagickMemory(void *memory,const size_t size)
 
   if (memory == (void *) NULL)
     return(AcquireMagickMemory(size));
-#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
+#if !defined(MAGICKCORE_ANONYMOUS_MEMORY_SUPPORT)
   block=memory_methods.resize_memory_handler(memory,size == 0 ? 1UL : size);
   if (block == (void *) NULL)
     memory=RelinquishMagickMemory(memory);