DWC_AllocEx

Syntax

#include <dwc.h> 
void* DWC_AllocEx(DWCAllocType name,
                  u32 size,
                  int align);

Arguments

name Information for library development. Specify 0.
size Size (in bytes) of the memory you want to allocate.
align Alignment (in bytes) of the memory to allocate. Passed to the memory allocation function set by the DWC_InitForDevelopment and DWC_InitForProduction functions.

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

Allocates memory using the memory allocation function set by the DWC_InitForDevelopment or DWC_InitForProduction functions.
The actual size allocated is the 32-byte header for internal management plus the size argument.

See Also

DWC_Realloc DWC_ReallocEx DWC_Free DWC_Alloc

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 the DWC_SetMemFunc function.
5.3 PR1
Revised the return value and the explanation related to the existence of the header for internal management.

For the change log before 5.1 PR2, click here.


CONFIDENTIAL