18#ifndef MAGICKCORE_MEMORY_PRIVATE_H
19#define MAGICKCORE_MEMORY_PRIVATE_H
21#include "MagickCore/magick-config.h"
23#if defined(__cplusplus) || defined(c_plusplus)
27#if defined(__powerpc__)
28# define CACHE_LINE_SIZE (16 * MAGICKCORE_SIZEOF_VOID_P)
30# define CACHE_LINE_SIZE (8 * MAGICKCORE_SIZEOF_VOID_P)
33#define CACHE_ALIGNED(n) MAGICKCORE_ALIGN_UP(n,CACHE_LINE_SIZE)
35#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6))
37#define MagickAssumeAligned(address) \
38 __builtin_assume_aligned((address),CACHE_LINE_SIZE)
40#define MagickAssumeAligned(address) (address)
43#define MagickAssumeAligned(address) (address)
46static inline size_t OverAllocateMemory(
const size_t length)
56 for (extent=256; extent < length; extent*=2);
60extern MagickPrivate MagickBooleanType
61 ShredMagickMemory(
void *,
const size_t);
63extern MagickPrivate
void
64 ResetMaxMemoryRequest(
void),
65 ResetVirtualAnonymousMemory(
void),
66 SetMaxMemoryRequest(
const MagickSizeType),
67 SetMaxProfileSize(
const MagickSizeType);
69#if defined(__cplusplus) || defined(c_plusplus)