TCP/IP: Unclear dependency between heap_4/heap_5 and BufferAllocation_1/BufferAllocation_2

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.

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:

  1. 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.
  2. 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.

I agree with your conclusion and also agree that the tutorial seems a bit outdated.

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?

Isn’t heap_3 also suitable ?

Yes, as long as the heap implementation from standard library handles fragmentation reasonably well.