DWC_Realloc

Syntax

#include <dwc.h>

void* DWC_Realloc  ( DWCAllocType name,
                    void*        ptr,
                    u32          oldsize,
                    u32          newsize );
void* DWC_ReallocEx( DWCAllocType name,
                    void*        ptr,
                    u32          oldsize,
                    u32          newsize,
                    int          align   );

Description

Moves and changes the size of reserved memory using the memory reservation function configured with the DWC_SetMemFunc function.

Within the library, once the memory of a new size has been reserved in a different environment, an operation is run to release the original memory.

When DWC_Realloc is used, 32 is assigned to the align argument in the memory reservation function. With DWC_ReallocEx, the align argument from this function is assigned to the align argument in the memory reservation function.

Arguments

name This information is for library development. Specify 0.
ptr Pointer to the memory allocated by the memory allocation function specified by DWC_SetMemFunc.
oldsize This information is for library development. Specify 0.
newsize Memory size (in bytes) after making the change.
align Alignment (in bytes) of the memory you wish to reserve. This is assigned to the specified memory reservation function with the DWC_SetMemFunc function.

Return Values

Using the DWC_SetMemFunc function, the specified memory reservation function returns a pointer to the newly reserved memory.

See Also

DWC_SetMemFunc
DWC_Alloc
DWC_AllocEx
DWC_Free

Revision History

2007/09/13 Corrected Syntax.
2005/12/16 Initial version.


CONFIDENTIAL