> I don't think I have thought that through fully, but mboxes are > only created in 5 different sizes (at maximum), so it shouldn't be > too hard to switch over mbox size to know the pool to allocate from?
No! In general case, sizes are NOT different. At compile-time macro expansions define each size, but at run-time sys_mbox_new() cannot match given numeric value to one of macros if their values are equal. That's the problem ! I suggest define enumeration of mbox types and change interface of sys_mbox_new() to pass that type instead size. This solution will be more flexible in order to enable engineers make ports with efficient memory usage. Of course, if not to mention memory waste, then I can allocate all mboxes having size of the biggest one and place them in one common pool and do not worry about nothing. Moreover, I found that default values for all mboxes sizes are zero in opt.h. Does it mean that user must define them in lwipopts.h ? But user generally don't know workflows in lwip such precisely in order to determine optimal values. _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
