[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #37148] memory pool content is being corrupted after m
[lwip-devel] [bug #37148] memory pool content is being corrupted after memp_free()
Thu, 23 Aug 2012 06:02:44 +0000
Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.83 Safari/537.1
Follow-up Comment #3, bug #37148 (project lwip):
> See, 'mem' argument points to memory which holds initialized data.
Yes, it's now clear that this is your actual problem, and I don't think anyone
has tried to do that before or there would have been bug reports already.
> But somebody (likely other person)
I think that was me (some years ago).
> forget about memp_free() and defined MEMP_SIZE value as zero.
That was not an error but an intentional decision to save memory and reuse the
data part to keep the linked list pointers - this works because the data part
is only used when allocated and the linked list pointer is only used when
> Moreover, it will corrupt neighbour memory contents on platforms
> where pointer size exceeds minimum size allowed for lwip pool
I think this can only happen when MEM_ALIGNMENT is not defined correctly. You
might be correct though that this wouldn't work on a platform where you don't
want/need memory alginment but pointers are big. However, this is a rather
theoretical issue, given the fact that lwIP does not have pool items that
> What do you recommend to solve this problem gracefully ?
I can't recommend anything right now to solve this *gracefully* besides adding
another config option to support something that lwIP has not yet been designed
Reply to this item at:
Nachricht gesendet von/durch Savannah