GetCurAddr
Product Support
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
√ |
|
√ |
|
x |
Function
Returns the starting address of the currently free physical location.
Prototype
1 2 | template <Hardware hard> __aicore__ inline uint32_t LocalMemAllocator<hard>::GetCurAddr() const |
Parameters
None
Returns
Starting address of the currently free physical location. The value range is [0, Maximum size of the physical memory).
Restrictions
None
Example
1 2 3 | LocalMemAllocator allocator; // The default physical location is UB. Because the allocation starts from address 0, the following print result is 0. AscendC::printf("current addr is %u\n", allocator.GetCurAddr()); |
Parent topic: LocalMemAllocator