lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Custom Memory Pool in lwip


From: Dirk Ziegelmeier
Subject: Re: [lwip-users] Custom Memory Pool in lwip
Date: Fri, 8 Jul 2016 14:36:42 +0200

Custom pools is a feature implemented after 1.4.1​. Will be in 2.0.0 release.

​Try to add the following lines from ​
memp.h (in 2.0.0) at the top
​, maybe this will help you​
:
/* run once with empty definition to handle all custom includes in lwippools.h */
#define LWIP_MEMPOOL(name,num,size,desc)
#include "lwip/priv/memp_std.h"

​Don't forget the https://en.wikipedia.org/wiki/Include_guard​ in your private headers.



Ciao
Dirk

--
Dirk Ziegelmeier * address@hidden * http://www.ziegelmeier.net

On Fri, Jul 8, 2016 at 2:24 PM, Sushain Razdan <address@hidden> wrote:

On 7/7/2016 3:00 PM, Sushain Razdan wrote:
Hi,

Thanks for your reply ! Sorry for replying so late

I am currently using lwip version 1.4.1 and this version doesn't have
the Marco LWIP_MEMPOOL_DECLARE as used in httpd.c in the latest
version, Also I found that memory management is quite different. My
understanding of the problem is as follows:

Application i.e. user code declares the custom pools in lwipppools.h.
This header is in-turn included by memp_std.h which has declaration of
standard pools. Now memp_std.h is included multiple times in memp.c so
as to fill up the static memory management variables. Hence I cannot
include private header files in lwippools.h due to multiple header
inclusion. Only workaround which I found was to include my private
headers in memp.c, so that lwip's memory management is aware of what
structures need to be allocated. This would mean changing lwip's core
source for application specific needs.

Can you suggest a better solution keeping the same lwip version ?

Thanks,

Sushain



DISCLAIMER

This message and any attachment therewith is privileged, confidential and proprietary in nature and the property of the originator. It is intended solely and exclusively for use by the individual to whom it is addressed. It should not be circulated or used for any purpose other than for what is stated. If you have received this message erroneously, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message and are called upon to delete the same from your system. Any contradictory action by you may invite penal consequences. Vihaan Networks Limited accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including but not limited to damage from virus."


reply via email to

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