=memory - ImageMagick Memory Allocation Methods9W




"NAME

5

memory - ImageMagick Memory Allocation Methods



2page index




&SYNOPSIS

C

void * AllocateMemory( const size_t size );

;

void FreeMemory( void ** memory );

S

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



2page index


$

FUNCTION *DESCRIPTIONS



4

AllocateMemory

n

Method AllocateMemory returns a pointer to a block of at least size bytes suitably aligned for any use.

2

The format of the AllocateMemory method is:

H
void *AllocateMemory ( const size_t size );

AA description of each parameter follows:


B

memory:

gMethod AllocateMemory returns a pointer to a block of at least size bytes suitably aligned for any use.

>

size:

+Specifies the size of the memory to return.



,

FreeMemory

F

Method FreeMemory frees memory that has already been allocated.

.

The format of the FreeMemory method is:

?
void FreeMemory ( void **memory );

AA description of each parameter follows:


>

span:

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



8

ReallocateMemory

½

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

4

The format of the ReallocateMemory method is:

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

AA description of each parameter follows:


#

memory:

iMethod ReallocateMemory returns a pointer to a block of at least size bytes suitably aligned for any use.

!

size:

+Specifies the size of the memory to return.
9

page index