mapped;
void
- *memory;
+ *blob;
size_t
signature;
% %
% %
% %
-% A c q u i r e M e m o r y I n f o %
+% A c q u i r e V i r t u a l M e m o r y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% AcquireMemoryInfo() returns a MemoryInfo structure. This method always
-% succeeds.
+% AcquireVirtualMemory() allocates a pointer to a block of memory at least size
+% bytes suitably aligned for any use.
+%
+% The format of the AcquireVirtualMemory method is:
+%
+% MemoryInfo *AcquireVirtualMemory(const size_t count,const size_t quantum)
%
-% The format of the AcquireMemoryInfo method is:
+% A description of each parameter follows:
+%
+% o count: the number of quantum elements to allocate.
%
-% MemoryInfo *AcquireMemoryInfo(void)
+% o quantum: the number of bytes in each quantum.
%
*/
-MagickExport MemoryInfo *AcquireMemoryInfo(void)
+MagickExport MemoryInfo *AcquireVirtualMemory(const size_t count,
+ const size_t quantum)
{
MemoryInfo
*memory_info;
% %
% %
% %
-% G e t M e m o r y I n f o M e m o r y %
+% G e t V i r t u a l M e m o r y B l o b %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% GetMemoryInfoMemory() returns a pointer to a block of memory at least size
-% bytes suitably aligned for any use.
+% GetVirtualMemoryBlob() returns the virtual memory blob associated with the
+% specified MemoryInfo structure.
%
-% The format of the GetMemoryInfoMemory method is:
+% The format of the GetVirtualMemoryBlob method is:
%
-% void *GetMemoryInfoMemory(MemoryInfo *memory_info,const size_t count,
-% const size_t quantum)
+% void *GetVirtualMemoryBlob(const MemoryInfo *memory_info)
%
% A description of each parameter follows:
%
% o memory_info: The MemoryInfo structure.
-%
-% o count: the number of quantum elements to allocate.
-%
-% o quantum: the number of bytes in each quantum.
*/
-MagickExport void *GetMemoryInfoMemory(MemoryInfo *memory_info,
- const size_t count,const size_t quantum)
+MagickExport void *GetVirtualMemoryBlob(const MemoryInfo *memory_info)
{
assert(memory_info != (const MemoryInfo *) NULL);
assert(memory_info->signature == MagickSignature);
- return(memory_info->memory);
+ return(memory_info->blob);
}
\f
/*
% %
% %
% %
-% R e l i n q u i s h M e m o r y I n f o %
+% R e l i n q u i s h V i r t u a l M e m o r y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% RelinquishMemoryInfo() destroys the MemoryInfo structure returned by a
-% previous call to AcquireMemoryInfo().
+% RelinquishVirtualMemory() frees memory acquired with AcquireVirtualMemory().
%
-% The format of the RelinquishMemoryInfo method is:
+% The format of the RelinquishVirtualMemory method is:
%
-% MemoryInfo *RelinquishMemoryInfo(MemoryInfo *memory_info)
+% MemoryInfo *RelinquishVirtualMemory(MemoryInfo *memory_info)
%
% A description of each parameter follows:
%
% o memory_info: A pointer to a block of memory to free for reuse.
%
*/
-MagickExport MemoryInfo *RelinquishMemoryInfo(MemoryInfo *memory_info)
+MagickExport MemoryInfo *RelinquishVirtualMemory(MemoryInfo *memory_info)
{
assert(memory_info != (MemoryInfo *) NULL);
assert(memory_info->signature == MagickSignature);
- if (memory_info->memory != (void *) NULL)
- memory_info->memory=(void *) NULL;
+ if (memory_info->blob != (void *) NULL)
+ memory_info->blob=(void *) NULL;
memory_info->signature=(~MagickSignature);
memory_info=(MemoryInfo *) RelinquishAlignedMemory(memory_info);
return(memory_info);
*(*ResizeMemoryHandler)(void *,size_t) magick_alloc_size(2);
extern MagickExport MemoryInfo
- *AcquireMemoryInfo(void),
- *RelinquishMemoryInfo(MemoryInfo *);
+ *AcquireVirtualMemory(const size_t,const size_t) magick_alloc_sizes(1,2),
+ *RelinquishVirtualMemory(MemoryInfo *);
extern MagickExport void
*AcquireAlignedMemory(const size_t,const size_t)
DestroyMagickMemory(void),
GetMagickMemoryMethods(AcquireMemoryHandler *,ResizeMemoryHandler *,
DestroyMemoryHandler *),
- *GetMemoryInfoMemory(MemoryInfo *,const size_t,const size_t)
- magick_alloc_sizes(2,3),
+ *GetVirtualMemoryBlob(const MemoryInfo *),
*RelinquishAlignedMemory(void *),
*RelinquishMagickMemory(void *),
*ResetMagickMemory(void *,int,const size_t),