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