site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Jun 28, 2005, at 13:16 , Carl Smith wrote: 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 (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... 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? This email sent to site_archiver@lists.apple.com
participants (1)
-
Justin C. Walker