Memory allocation

Hello

I noticed that the navigator used almost all its allocated memory (1296). I tried allocating some more (1992) and it then used 1436 (see the “top-dump”). The amount it uses seems to be dependent on the amount of waypoint uploaded but this is still a little uncertain. I have had some "up_hardfault"s - can this be connected to the memory issue?

Also I cant help to notice the it states that DMA Memory is 5120 total and 1536 used. Summing the USED column however adds up to a lot more that 1536 - can anyone clarify on this?

Processes: 23 total, 2 running, 21 sleeping
CPU usage: 48.51% tasks, 0.67% sched, 50.82% idle
DMA Memory: 5120 total, 1536 used 1536 peak
Uptime: 1026.207s total, 531.151s idle

PID COMMAND CPU(ms) CPU(%) USED/STACK PRIO(BASE) STATE
0 Idle Task 531151 50.817 0/ 0 0 ( 0) READY
1 hpwork 27316 2.674 820/ 1592 192 (192) w:sig
2 lpwork 7330 0.668 716/ 1592 50 ( 50) w:sig
3 init 1473 0.000 1132/ 2496 100 (100) w:sem
153 commander_low_prio 36 0.000 580/ 2992 50 ( 50) w:sem
100 gps 2686 0.222 812/ 1192 220 (220) w:sem
102 dataman 232 0.000 748/ 1192 90 ( 90) w:sem
140 sensors 47539 4.606 1060/ 1696 250 (250) w:sem
142 commander 20850 1.931 2668/ 3192 140 (140) w:sig
149 px4io 32135 3.120 1052/ 1392 240 (240) w:sem
285 top 20389 3.194 1284/ 1696 100 (100) RUN
158 mavlink_if0 14912 1.485 1812/ 2392 100 (100) w:sig
159 mavlink_rcv_if0 827 0.000 1548/ 2096 175 (175) w:sem
175 mavlink_if1 11959 1.114 1716/ 2392 100 (100) w:sig
176 mavlink_rcv_if1 79 0.000 956/ 2096 175 (175) w:sem
220 log_writer_file 0 0.000 340/ 1016 60 ( 60) w:sem
210 mavlink_if2 561 0.000 1276/ 2392 100 (100) w:sig
218 logger 6378 0.594 1236/ 3592 250 (250) w:sem
261 ekf2 236134 23.848 4972/ 5792 250 (250) w:sem
264 fw_att_control 25369 2.451 1044/ 1392 250 (250) w:sem
267 fw_pos_ctrl_l1 4858 0.445 908/ 1696 250 (250) w:sem
273 sw_fw 4543 0.371 508/ 1392 100 (100) w:sig
278 navigator 17800 1.783 1436/ 1992 105 (105) w:sem

Best regards
Nikolaj Holm

1 Like