lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] mem.c bug?


From: Dick Balaska
Subject: [lwip-users] mem.c bug?
Date: Sun, 13 Sep 2009 01:14:36 -0400
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Hi ho,

I gave mem.c my 8KB USB ram for its heap. This sram stands alone in memory space. mem.c:mem_init() failed, because it creates a struct mem at the first address after the heap. In my case, that would be an address exception, in normal cases, that would be some memory that it does not own.

I fixed it by changing
#define MEM_SIZE_ALIGNED     LWIP_MEM_ALIGN_SIZE(MEM_SIZE)
to
#define MEM_SIZE_ALIGNED LWIP_MEM_ALIGN_SIZE(MEM_SIZE - SIZEOF_STRUCT_MEM)


dik





reply via email to

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