lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] 'Avoiding sys_thread_new' and 'RTOS Integration'


From: Dirk Ziegelmeier
Subject: Re: [lwip-users] 'Avoiding sys_thread_new' and 'RTOS Integration'
Date: Mon, 10 Oct 2016 08:58:08 +0200


I still don't understand the statement I quoted from the documentation. For example how would one allocate on the stack for sys_mbox_new()?
 
​You can't. All you can do in such cases is count how many mboxes/semaphores/threads etc. you need and allocate their storage statically. A call to sys_mbox_new() just returns "the next one" from the static allocated ones. This is what we do at work in constrained devices.
If you do this in your COMPLETE design, the linker will tell you whether your application fits into RAM - no runtime worries about that any more.

If you need some private memory pool, lwIP 2.0.0 already solved that for you:
http://www.nongnu.org/lwip/2_0_0/group__mempool.html

​Dirk


reply via email to

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