[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Newbie question (tcp_pcb* allocation)
From: |
Jani Monoses |
Subject: |
Re: [lwip-users] Newbie question (tcp_pcb* allocation) |
Date: |
Fri, 27 Feb 2004 13:14:41 +0200 |
> Yes, I agree that a listening TCP PCB is a good thing. But what
> happens is; you first allocate a full PCB, then a listening PCB, and
> when the connection occurs, again a full PCB.
>
> Maybe there should be a way of allocating a listening PCB right away?
> Just an idea, the current stuff works OK furterwise.
I thought about making no distinction between the two types of PCBs at
all. That would greatly simplify the code at the expense of ~100 bytes
per listening socket the assumption (maybe wrong) being that there are
few (most of the time only one) listening PCBs on a given system.
Some tricks can be done to reduce that 100 byte of overhead too.
And I am aware this is a lot of waste for targets which are very RAM
constrained but have enough code memory.