Re: mbuf from scratch
Re: mbuf from scratch
- Subject: Re: mbuf from scratch
- From: "Justin C. Walker" <email@hidden>
- Date: Tue, 28 Jun 2005 13:51:30 -0700
On Jun 28, 2005, at 13:16 , Carl Smith wrote:
I was trying to get the consensus, is it OK to keep this "copied"
'ifp'
around or should I create everything 'new' from scratch, when
inputting
my data into the mbuf? I am asking this question relating to
performance, timing, memory and potential errors. Is there any benefit
to creating the 'ifp' from scratch versus keeping a copy around?
The 'ifp' is a pointer to a kernel structure that you have no control
over. It is associated with a given mbuf at some point during the
mbuf's passage through the twisty little code passages in the
kernel. Therefore,
- if you are 'duplicating' an mbuf, copy the value from the
original mbuf and store it in the new one (e.g., as an argument to
m_devget()).
- do *not* save it anywhere for later use.
The fact that you keep referring to creating the ifp from scratch
concerns me (i.e., I don't understand what you are getting at). You
never create this pointer; you just copy it from the original mbuf to
the copy. What are you thinking about that makes "create from
scratch" a meaningful operation?
Regards,
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for General Semantics
--------
If you're not confused,
You're not paying attention
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden