DWC_ReallocEx

Syntax

#include <dwc.h>

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

Arguments

name Information for library development. Specify 0.
ptr Pointer to the memory allocated using the memory allocation function specified by the DWC_Init function.
oldsize Information for library development. Specify 0.
newsize Memory size (in bytes) after making the change.
align Alignment (in bytes) of the memory to be reserved. This is passed to the memory allocation function that was set using the DWC_Init function.

Return Values

Returns a pointer to the memory newly allocated using the memory allocation function specified by DWC_Init.

Description

Moves and changes the size of the memory allocated using the memory allocation function specified by DWC_Init.

Once memory of a new size has been reserved in a different region, the library internally releases the original memory. The newly-released memory is not initialized.

When the DWC_ReallocEx function is used, the align argument from this function is passed to the align argument in the memory allocation function.

Revision History

1.2.1
Changed so that newly-released memory will not be initialized.

CONFIDENTIAL