[En-Nut-Discussion] TCP vs. Memory - a solution

Harald Kipp harald.kipp at egnite.de
Tue Oct 20 20:51:07 CEST 2009


Harald Kipp wrote:

> After a short time Nut/OS heap space went down to 82 bytes. Wow!

I even got it down to 60 bytes. Without crashing, btw.

Actually Michael's suggestion was only part of the story. Limiting the
buffer for segments following a lost segment was the first task. I made
it global, so it will limit the buffer for all connections.

The second part was the buffer for packets in sequence. During a phone
call with Michael we discussed several strategies. I strongly rejected
his idea to use the filler of the Ethernet frame and suggested a real
window buffer instead. After hanging up I thought about Michael's idea
again and it finally led me to the current solution. If there are at
least 8 packets in the queue with at least one small packet it front,
they will be collected into 1 packet. The great thing here is, that only
a few changes were required.

I committed the code to SVN trunk.

Harald



More information about the En-Nut-Discussion mailing list