目录

MallocAdvise

Function Description

Allocates device memory in the developer memory pool based on the specified size. The recommended memory address is the value of addr.

Function Prototype

virtual MemBlock *MallocAdvise(size_t size, void *addr)

Parameters

Parameter Input/Output Description
size Input Size of the memory to be allocated.
addr Input Recommended address (value of addr) of the memory to be allocated.

Return Value

Type Description
MemBlock* Returns the MemBlock pointer.

Exception Handling

None

Restrictions

Virtual functions need to be implemented by developers. If a function is not implemented, it is equal to Malloc by default.