lwip-users
[Top][All Lists]
Advanced

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

Re:RE: RE: [lwip-users] how can I do when I want to set MEM_USE_POOLS =


From: embed9527
Subject: Re:RE: RE: [lwip-users] how can I do when I want to set MEM_USE_POOLS = 1?
Date: Wed, 28 Nov 2007 09:45:51 +0800 (CST)

 
I has set MEM_USE_POOLS and MEMEP_USE_CUSTOM_POOLS enable, and add the file lwippools.
 
 
compiler code, It can't find MEMP_POOL_START and MEMP_POOL_END in the funtion mem_malloc() of the file mem.c, it should be change MEMP_POOL_START to MEMP_POOL_FIRST and change MEMP_POOL_END to MEMP_POOL_LAST, MEMP_POOL_FIRST and MEMP_POOL_LAST defindes in the memp.h.

在2007-11-28,"Grubb Jared" <address@hidden> 写道:

I realize this was never adequately documented. … I have updated the article on lwipopts.h to explain more about the MEM_USE_POOLS and MEMP_USE_CUSTOM_POOLS options.

 

http://lwip.scribblewiki.com/Lwipopts.h

http://lwip.scribblewiki.com/Custom_memory_pools

 

Jared

 

 

From: lwip-users-bounces+jgrubb=address@hidden [mailto:lwip-users-bounces+jgrubb=address@hidden] On Behalf Of embed9527
Sent: Tuesday, November 27, 2007 01:28
To: Mailing list for lwIP users
Subject: Re:RE: [lwip-users] how can I do when I want to set MEM_USE_POOLS = 1?

 

 

I'm set MEM_USE_POOLS = 1, not MEMP_USE_CUSTOM_POOLS, maybe it is some difference?

 

 


2007-11-27"Goldschmidt Simon" <address@hidden> 写道:

Here is what Jared (I think he invendet the new memp settings code)
wrote about it on lwip-devel:
 
As far as setting up a set number, you can define as many as you like.
So:
* #define MEMP_USE_CUSTOM_POOLS 1 to turn on the custom pools.. 
* Create a "lwippools.h" in the same directory as your "lwipopts.h"
file (doesn't really have to be in the same directory, but it may as
well be). Here is one I put together for an example... did I upload it
to the CVS somewhere?
 
 
 
/* OPTIONAL: Pools to replace heap allocation
* Optional: Pools can be used instead of the heap for mem_malloc. If so,
these
* should be defin!
 ed here, in increasing order according to the pool
element size.
*
* LWIP_MALLOC_MEMPOOL(number_elements, element_size) */ #if
MEM_USE_POOLS LWIP_MALLOC_MEMPOOL_START LWIP_MALLOC_MEMPOOL(20, 256)
LWIP_MALLOC_MEMPOOL(10, 512) LWIP_MALLOC_MEMPOOL(5, 1024)
LWIP_MALLOC_MEMPOOL_END #endif /* MEM_USE_POOLS */
/* Optional: Your custom pools can go here if you would like to use
lwIP's
* memory pools for anything else.
*/
LWIP_MEMPOOL(SYS_MBOX, 22, sizeof(struct sys_mbox_struct), "SYS_MBOX")
LWIP_MEMPOOL(SYS_SEM, 12, sizeof(struct sys_sem_struct), "SYS_SEM")
 
________________________________
 
Hi,
 
    I'm test LWIP When !
 I put ME
M_USE_POOLS = 1, then compiler code, some
of errors in memp.h. What do I do when I want to set MEM_USE_POOLS = 1?
or is it some error in the file memp.h?
 
 
Thanks.
 
 
_______________________________________________
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]