The documentation Adding the TCP/IP Source Files to an RTOS Project
states the following:
The application must be using the heap_4 or heap_5 memory allocator.
Later the docs say the following:
BufferAllocation_2.c can only be used with the heap_4 and heap_5 memory allocators.
(Note, it explictity states 2 )
So, do I still need to use heap_4 or heap_5 if I use BufferAllocation_1 .
hs2
(Hartmut Schaefer)
March 18, 2023, 11:17am
2
Here Embedded TCP Network Buffer Allocation Schemes is a good explanation what’s needed with which allocation scheme.
So then the possible answers to my question are:
Based on the information on your link, the documentaton at Adding the TCP/IP Source Files to an RTOS Project
is indeeded wrong, as BufferAllocation_1.c
does not need a heap.
There is some other code, that neededs heap, and because of that a heap implementation must still be selected.
Based on the link you provided, I would say the first answer is correct and the documentation should be updated.
hs2
(Hartmut Schaefer)
March 18, 2023, 2:59pm
4
I agree with your conclusion and also agree that the tutorial seems a bit outdated.
aggarg
(Gaurav Aggarwal)
March 20, 2023, 7:55am
5
Thank you for bringing it to our attention. I have forwarded this to our documentation team and we will get it fixed.
[Edit] - I have suggested that we remove the following line from point number 3 on this page -
BufferAllocation_2.c can only be used with the heap_4 and heap_5 memory allocators.
It is already mentioned at the top of the page that the application must use heap 4 or heap 5.
Can you confirm that this addresses your concern?
hs2
(Hartmut Schaefer)
March 20, 2023, 8:51am
6
Isn’t heap_3 also suitable ?
aggarg
(Gaurav Aggarwal)
March 20, 2023, 4:18pm
7
Yes, as long as the heap implementation from standard library handles fragmentation reasonably well.