README
memory
Example Summary
This application demonstrates shows the use of xdc.runtime.Memory module and different xdc.runtime.IHeap implementations to manage memory.
Example Usage
- Run the application, the two tasks that run will allocate memory from two different
IHeapimplementations and print their memory statuses to the console.
Application Design Details
The application dynamically constructs two tasks, both tasks use
xdc.runtime.Memoryto allocate memory but use two different differentIHeapimplementations or heaps.The first task runs as
task0Fxnusesti.sysbios.heaps.HeapBufto dynamically create its heap,task0Heap, because the allocations are of a fixed size.The second task run as
task1Fxnusesti.sysbios.heaps.HeapMemto dynamically construct its heap,task1Heap, as this task allocates variable block sizes. Both tasks print their heap status before allocations and after freeing the allocated memory.
The system heap is created statically using
ti.sysbios.heaps.HeapMemand is plugged intoxdc.runtime.memoryas thedefaultHeapInstance. Please see the corresponding configuration file memory.cfg for details.
References
For GNU and IAR users, please read the following website for details about enabling semi-hosting in order to view console output.
For more help, search the SYS/BIOS User Guide.