Other Parts Discussed in Thread: SYSBIOS
Hello,
I am working on a Sitara AM437x project. I am currently implementing a serial command, which allows me to query some important system information like e.g. the timings of the SYS/BIOS tasks, the stack occupation etc....
One of the missing information I would like to query, is the current consumed heap memory when e.g. creating OS tasks via TaskP_create();
Inside out project configuration file we defined the following amount of heap memory:
var BIOS = xdc.useModule('ti.sysbios.BIOS');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
/*
* The BIOS module will create the default heap for the system.
* Specify the size of this default heap.
*/
BIOS.heapSize = 32000;
I have seen that there if obviously a way to get some heap statistics, I checked the following web-page:
void HeapMem_getStats (HeapMem_Handle handle, Memory_Stats *stats);
Can I use the above function in order to check how much of the current heap is being occupied? Or is there another ways to check how much heap is currently in use?
If I can use the above function, I may need to know how I get the default heap memory handle (first function argument), which is currently in use by the system. How can I access this handle inside our firmware?
Thanks,
Inno