DWC_Realloc

Syntax

#include <dwc.h> 
void* DWC_Realloc(DWCAllocType name,
                  void *ptr,
                  u32 oldsize,
                  u32 newsize);

Arguments

name Information for library development. Specify 0.
ptr Pointer to the memory allocated by the DWC_InitForDevelopment or DWC_InitForProduction function.
oldsize Information for library development. Specify 0.
newsize Memory size (in bytes) after making the change.

Return Values

Returns the pointer to the address where the header size (32 bytes) for internal management is added to the start of the memory allocated by the memory allocation function set by the DWC_InitForDevelopment or DWC_InitForProduction function.

Description

Moves and changes the size of allocated memory using the memory allocation function set by the DWC_InitForDevelopment and DWC_InitForProduction functions.

Once the memory of a new size has been allocated in a different region, the library internally deallocates the original memory.

A value of 32 is passed in the align argument of the memory allocation function.

See Also

DWC_Alloc DWC_AllocEx DWC_Free

Revision History

5.3
Revised the Description because the specification was changed to set the allocator using either the DWC_InitForDevelopment or DWC_InitForProduction functions, and not with the DWC_SetMemFunc function.
5.3 PR1
Revised an explanation of the return value relating to the existence of the header for internal management.

For the change log before version 5.1 PR2, click here.   


CONFIDENTIAL