lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Reducing DHCP RAM usage


From: JM
Subject: Re: [lwip-users] Reducing DHCP RAM usage
Date: Mon, 30 Nov 2009 18:37:44 -0800 (PST)

It's not an urgent need of course, just something that might be nice in the future.  Thanks for the reply.

--- On Mon, 11/30/09, address@hidden <address@hidden> wrote:

From: address@hidden <address@hidden>
Subject: Re: [lwip-users] Reducing DHCP RAM usage
To: "Mailing list for lwIP users" <address@hidden>
Date: Monday, November 30, 2009, 8:55 AM

JM wrote:
> I'm sort of nitpicking here, seeing as how I had to increase MEM_SIZE not much beyond what I originally had it set to, but in my application RAM is very valuable.  It would be nice to dynamically allocate RAM for DHCP, then release it since it's only required momentarily (I'm assuming, not sure).  Anyway, is there an easy way to reduce the amount of RAM DHCP requires?  I just want the basic stuff: IP, GW, NM, DNS, don't care about lease time....I'm not sure what else is provided, but I likely don't require it.  I'm using 1.3.0, although I should swap in 1.3.2 when it's released.
>
I have already worked on reducing RAM usage of the DHCP client, however this won't be integrated into 1.3.2, as we don't want to introduce too much new code in that release in order to not make it unstable.

In general, I tend to prefer allocating a bit more RAM statically over too much dynamic allocation/deallocation. Therefore, (in my local code,) I have removed the need for extra RAM allocation when receiving packets (the options_in/msg_in pointers).

However, what you seem to be trying is to have a DHCP client that doesn't really implement the full feature set of the DHCP RFC (since you want to remove members from struct dhcp that are needed). It seems like you want a BOOTP client rather than a DHCP client. We could certainly think about having a configuration option that strips down our DHCP client to a BOOTP client to save RAM (and ROM), but again, that won't go into 1.3.2, I'm afraid.

Simon


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

[Prev in Thread] Current Thread [Next in Thread]