DWC_Realloc

C Specification

#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 memory of a new size has been reserved in a different environment, a operation is run to release the original memory.

When the DWC_Realloc function is used, 32 is assigned to the align argument in the memory reservation function. When the DWC_ReallocEx function is used, 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

12/16/2005 Initial version.