[Top][All Lists]

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

Re: [lwip-users] Dealloc in fs_close_custom()?

From: Giuseppe Modugno
Subject: Re: [lwip-users] Dealloc in fs_close_custom()?
Date: Tue, 27 Feb 2018 08:54:40 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Il 27/02/2018 06:36, Simon Goldschmidt ha scritto:
Giuseppe Modugno wrote:
And another thing I couldn't explain. The example uses pextension pointer for 
malloc/free. However it sets file->data = file->pextension immediately.
So why don't use just file->data? It seems pextension is never used in lwip code.
Exactly. This is an example that wants to show you can use pextension for 
anything you like
as it is not used by lwIP code internally.

Using ->data only works for files in one piece.
Maybe I'm wrong, but here pextension and state void pointers are very, very similar. Maybe it's possible to reduce the complexity leaving only one member.

reply via email to

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