lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip-members] RFC: change return type/value of pbuf_f


From: David Haas
Subject: [lwip-users] Re: [lwip-members] RFC: change return type/value of pbuf_free()
Date: Mon, 31 Mar 2003 10:51:52 -0500
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4a) Gecko/20030327

Sounds fine.
David.


address@hidden wrote:


Hello,

this is a Request For Comments to have the return type of pbuf_free()
changed.

Currently, pbuf_free() returns the number of pbufs that have been
de-allocated from the head of a pbuf chain.

Throughout lwIP, this return value is "used" at one place, this is:

tcp.c/tcp_seg_free()

... which returns the output from pbuf_free().

tcp.c/tcp_segs_free()  (NOTE the extra s) calls tcp_seg_free()
and cumulates the return values from successive calls to
tcp_seg_free() and returns that as its own return value.

However, this count is used nowhere throughout the stack, so
effectively, the return value of pbuf_free() is used nowhere as
well.

My proposal is to have pbuf_free() return the first pbuf in the chain that still is being referenced (i.e. the new chain after pbuf_free() was called
on the chain).

This may allow for easier pbuf memory allocation debugging.

Regards,

Leon Woestenberg

Axon Digital Design

------------------------------------------------------------------------

_______________________________________________
lwip-members mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/lwip-members






reply via email to

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