cache_anonymous_memory=0;
value=GetPolicyValue("pixel-cache-memory");
if (LocaleCompare(value,"anonymous") == 0)
- cache_anonymous_memory=1;
+ {
+#if defined(MAGICKCORE_HAVE_MMAP) && defined(MAP_ANONYMOUS)
+ cache_anonymous_memory=1;
+#else
+ (void) ThrowMagickException(exception,GetMagickModule(),
+ MissingDelegateError,"DelegateLibrarySupportNotBuiltIn",
+ "'%s' (policy requires anonymous memory mapping)",image->filename);
+#endif
+ }
value=DestroyString(value);
}
if ((image->columns == 0) || (image->rows == 0))
nexus_info->mapped=MagickFalse;
nexus_info->cache=(Quantum *) MagickAssumeAligned(AcquireAlignedMemory(1,
(size_t) nexus_info->length));
- if (nexus_info->cache != (PixelPacket *) NULL)
+ if (nexus_info->cache != (Quantum *) NULL)
ResetMagickMemory(nexus_info->cache,0,(size_t) nexus_info->length);
}
else