mirror of
https://github.com/opentx/opentx.git
synced 2025-07-16 12:55:12 +03:00
[Horus] Malloc check added
This commit is contained in:
parent
cdb3f48da7
commit
d60de4466a
7 changed files with 50 additions and 23 deletions
|
@ -507,6 +507,10 @@ void printTaskSwitchLog()
|
|||
serialPrint("Tasks switch log at %u [<time>, <task_id>]:", get_tmr10ms());
|
||||
uint32_t lastSwitchTime = 0;
|
||||
uint32_t * tsl = new uint32_t[DEBUG_TASKS_LOG_SIZE];
|
||||
if (!tsl) {
|
||||
serialPrint("Not enough memory");
|
||||
return 0;
|
||||
}
|
||||
memcpy(tsl, taskSwitchLog, sizeof(taskSwitchLog));
|
||||
uint32_t * p = tsl + taskSwitchLogPos;
|
||||
uint32_t * end = tsl + DEBUG_TASKS_LOG_SIZE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue