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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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" <[EMAIL PROTECTED]> 写道: 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 defined 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 MEM_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 [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
