Giuseppe Modugno wrote:
> [..]
> In my case, I have a completely free (not used by the linker) 32kB RAM 
> region starting from 0x2007C000. To instruct lwip to use that region for 
> heap, I think I have to define:
> 
> #define MEM_SIZE      (32 * 1024 - 1 * SIZEOF_STRUCT_MEM)
> #define LWIP_RAM_HEAP_POINTER     ( (void *)0x2007C000 )
> 
> Supposing we don't need other additional space for alignment.
> In this case the total free heap memory available for data is exactly 
> MEM_SIZE, that is less than 32kB.
> 
> Is it correct?

I think so, yes. However, your definition of MEM_SIZE won't compile outside
of mem.c. Maybe it would be better to rework the code to use MEM_SIZE as
size of the available block, at least if an external block is used...

Simon

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to