Closed GoogleCodeExporter closed 8 years ago
Original comment by kazuh...@gmail.com
on 12 Feb 2007 at 12:12
"mbf" is bad function name ( everybody dont undersntad the meaning ).
this is named like a "mbuf_freem_list_with_check".
and "is critical to free the memory" is bad description.
this should be "added routine to avoid double free."
if u agree me , i merge this after renaming "mbf" to
"mbuf_freem_list_with_check".
Original comment by kazuh...@gmail.com
on 12 Feb 2007 at 7:39
ok :)
Original comment by jalav...@gmail.com
on 13 Feb 2007 at 5:13
jalavoui, i has one question.
why do u use not freePacket but mbuf_freem_list ?
i seem that mbuf_freem_list should not be called directly.
void IONetworkController::freePacket(struct mbuf * m, IOOptionBits options)
{
assert(m);
if ( options & kDelayFree )
{
m->m_nextpkt = _freeList;
_freeList = m;
}
else
{
m_freem_list(m);
}
}
int mbuf_freem_list(mbuf_t mbuf)
{
return m_freem_list(mbuf);
}
Original comment by kazuh...@gmail.com
on 13 Feb 2007 at 9:50
i'll try that
Original comment by jalav...@gmail.com
on 13 Feb 2007 at 10:33
at first.
I will define freePacket_withCheck like a following in mbf.
inline void freePacket_withCheck(mbuf_t m)
{
if( m != NULL && mbuf_len(m)!=0 && mbuf_type(m)!=MBUF_TYPE_FREE)
mbuf_freem_list(m);
}
and mbf() -> freePacket_withCheck().
Original comment by kazuh...@gmail.com
on 13 Feb 2007 at 11:48
sorry s/mbuf_free_list/freePacket/
Original comment by kazuh...@gmail.com
on 13 Feb 2007 at 11:50
Original comment by kazuh...@gmail.com
on 16 Feb 2007 at 5:02
Original issue reported on code.google.com by
kazuh...@gmail.com
on 11 Feb 2007 at 10:11