PUCCH0/1 FAPI PDU: heap allocations
nr_decode_pucch0()
makes a useless small heap allocation, which then has to be freed in handle_nr_uci_pucch_0_1()
.
Not only might this be a (small) performance overhead, but this allocation actually uses more memory on the heap than when inside the PDU.uci_01->harq->harq_list
is for 1 or 2 ack_nacks. Worst case is 8B (64bit pointer) + 2B for Acknack (uint8_t
). On the stack, it would always be only 2B (2 uint8_t
).
We should remove this dynamic allocation. This has an impact also on the L2 sim proxy.
Edit: in an earlier version I wrote that also PUCCH2/3/4 was affected, but that HARQ list can be very large, so a dynamic allocation seems to be justified.
Edited by Robert Schmidt