跳转至

mstxMemHeapUnregister

Supported Products

Product Supported
Ascend 910_95 AI Processors
Atlas A3 training products/Atlas A3 inference products
Atlas A2 training products/Atlas A2 inference products
Atlas 200I/500 A2 inference products
Atlas inference products
Atlas training products

Function

When a memory pool is unregistered, the regions associated with it are also unregistered.

Prototype

void mstxMemHeapUnregister(mstxDomainHandle_t domain, mstxMemHeapHandle_t heap)

Parameter Description

Table 1 Parameter description

Parameter

Input/Output

Description

domain

Input

domain is the domain to which the memory pool belongs. It can be globalDomain or the handle returned by mstxDomainCreateA.

Data Type: const char *.

heap

Input

heap is the handle of the memory pool to be unregistered. It is the return value of mstxMemHeapRegister.

struct mstxMemHeap_st;
typedef struct mstxMemHeap_st mstxMemHeap_t; 
typedef mstxMemHeap_t* mstxMemHeapHandle_t;

Returns

None

Example

mstxMemHeapDesc_t heapDesc{};
mstxMemHeapHandle_t memPool = mstxMemHeapRegister(globalDomain, &heapDesc); // Register Memory Poolter Memory Pool
...
mstxMemHeapUnregister(globalDomain, memPool);                        // Unregister Memory Poolister Memory Pool