GetCurAddr
产品支持情况
功能说明
返回当前物理位置空闲的起始地址。
函数原型
template <Hardware hard>
__aicore__ inline uint32_t LocalMemAllocator<hard>::GetCurAddr() const
参数说明
无
返回值说明
当前物理位置空闲的起始地址,范围为[0,物理内存最大值)。
约束说明
无
调用示例
LocalMemAllocator allocator;
// 默认的物理位置为UB,由于从0地址开始分配,下面的打印结果为0
AscendC::printf("current addr is %u\n", allocator.GetCurAddr());