[Top][All Lists]

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

[lwip-devel] [bug #37148] memory pool content is being corrupted after m

From: Simon Goldschmidt
Subject: [lwip-devel] [bug #37148] memory pool content is being corrupted after memp_free()
Date: Wed, 22 Aug 2012 20:08:58 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:14.0) Gecko/20100101 Firefox/14.0.1

Update of bug #37148 (project lwip):

                  Status:                    None => Works For Me           
             Assigned to:                    None => goldsimon              


Follow-up Comment #1:

Could you go a little more into detail here, please? Why is pool content
overwritten? The only thing we do here is to reuse the 'next' pointer: when an
allocated item is not in the pool, we don't need the next pointer.

>From your last line, my guess is that you are trying to use the memp pools in
a wrong way, i.e. initialize objects and put them back into the pool by
calling memp_free(xxx, obj) and expecting for obj to remain its state when
reallocated by memp_malloc() later. This is invalid: the memp-pools don't hold
objects, they only hold memory, the contents of which is *not* kept between
memp_free() and memp_malloc().

> Did anybody tried to implement it before me?

Regarding your statement "preallocate system objects": yes, but in the correct
way :-)


Reply to this item at:


  Nachricht gesendet von/durch Savannah

reply via email to

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