DWC_Alloc

Syntax

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

Arguments

name Information for library development. Specify 0.
size Size (in bytes) of the memory you want to allocate.

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 function.
The actual size allocated is the 32-byte header for internal management plus the size argument.
It passes 32 in the align argument of the memory allocation function.

See Also

DWC_Realloc DWC_ReallocEx DWC_Free DWC_AllocEx

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