lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] SNMP Memory


From: Zahir Lalani
Subject: RE: [lwip-users] SNMP Memory
Date: Tue, 25 May 2010 21:50:51 +0100

Hi Simon

 

Yes, I do mean that it returns Null with the native manager.

 

I did not consider alignment – will need to look at that.

Just for me to know which way this works, does LWIP tell the native manager how to align, or does LWIP conform to whatever alignment the native one has?

 

Thx for your help

 

Zahir

 

 

 

From: address@hidden [mailto:address@hidden On Behalf Of address@hidden
Sent: 22 May 2010 20:30
To: address@hidden
Subject: Re: [lwip-users] SNMP Memory

 

Zahir Lalani wrote:

I have managed to get snmp sort of working using the code written by Christiaan Simons. However, it took me a while to get it talking to GetIF. The problem was using the native C memory heap manager. If I did a simple request like time-up, it would work. If I tried anything more complex, it would crash horribly. I traced this down to failed memory allocation in msg_in.c. Having read up on the opts in lwip, I switched to using LWIP’s memory heap manager. This immediately cured the problem.

 

Any clues as to why this should be?

What do you mean by "failed memory allocation"? Does the "native C memory heap manager" return NULL where the lwIP one doesn't? If it does return != NULL and it crashes, you might want to check the alignment of the pointer returned: the lwIP code relies on the memory manager to return aligned pointers (i.e. meeting the alignment requirement configured by MEM_ALIGNMENT).

Simon


reply via email to

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