1 module dmagick.c.memory; 2 3 import dmagick.c.magickVersion; 4 5 extern(C) 6 { 7 struct MemoryInfo; 8 9 alias void* function(size_t) AcquireMemoryHandler; 10 alias void function(void*) DestroyMemoryHandler; 11 alias void* function(void*, size_t) ResizeMemoryHandler; 12 13 static if ( MagickLibVersion >= 0x687 ) 14 { 15 MemoryInfo* AcquireVirtualMemory(const size_t, const size_t); 16 MemoryInfo* RelinquishVirtualMemory(MemoryInfo*); 17 } 18 19 void* AcquireAlignedMemory(const size_t, const size_t); 20 void* AcquireMagickMemory(const size_t); 21 void* AcquireQuantumMemory(const size_t, const size_t); 22 void* CopyMagickMemory(void*, const(void)*, const size_t); 23 void DestroyMagickMemory(); 24 void GetMagickMemoryMethods(AcquireMemoryHandler*, ResizeMemoryHandler*, DestroyMemoryHandler*); 25 26 static if ( MagickLibVersion >= 0x687 ) 27 { 28 void* GetVirtualMemoryBlob(const(MemoryInfo)*); 29 } 30 31 void* RelinquishAlignedMemory(void*); 32 void* RelinquishMagickMemory(void*); 33 void* ResetMagickMemory(void*, int, const size_t); 34 void* ResizeMagickMemory(void*, const size_t); 35 void* ResizeQuantumMemory(void*, const size_t, const size_t); 36 void SetMagickMemoryMethods(AcquireMemoryHandler, ResizeMemoryHandler, DestroyMemoryHandler); 37 }