=memory - ImageMagick Memory Allocation Methods>/


NAME



.memory - ImageMagick Memory Allocation Methods






(

SYNOPSIS



<void * AllocateMemory( const size_t size );



?void FreeMemory( void *memory );



Lvoid * ReallocateMemory( void *memory, const size_t size );






B

FUNCTION DESCRIPTIONS






4

AllocateMemory



IMethod AllocateMemory returns a pointer to a block of at least size bytessuitably aligned for any use.



+The format of the AllocateMemory method is:

E
void *AllocateMemory ( const size_t size );


=A description of each parameter follows:


8

memory:


IMethod AllocateMemory returns a pointer to a block of at least size bytessuitably aligned for any use.

!

size:


+Specifies the size of the memory to return.






,

FreeMemory



?Method FreeMemory frees memory that has already been allocated.



'The format of the FreeMemory method is:

;
void FreeMemory ( void *memory );


=A description of each parameter follows:


!

span:


:Specifies the pointer to a block memory to free for reuse.






8

ReallocateMemory



DMethod ReallocateMemory changes the size of the memory and returns aKpointer to the (possibly moved) block. The contents will be unchanged up to$the lesser of the new and old sizes.



-The format of the ReallocateMemory method is:

U
void *ReallocateMemory ( void *memory, const size_t size );


=A description of each parameter follows:


#

memory:


KMethod ReallocateMemory returns a pointer to a block of at least size bytessuitably aligned for any use.

!

size:


+Specifies the size of the memory to return.