Thread (4 messages) 4 messages, 3 authors, 2014-01-07

simple memory malloc and free in ip_output.c

From: Valdis.Kletnieks at vt.edu <hidden>
Date: 2014-01-02 05:41:25

On Thu, 02 Jan 2014 12:12:49 +0700, Mulyadi Santosa said:
Other than what others have said, IMHO it is better to avoid such
rapid alloc/free, assuming your code fragment is running on every
packet reception/sending.

Instead, I suggest to allocate the memory before the ip_queue_xmit and
use-reuse it inside ip_queue_xmit.
Be careful with re-entrancy issues - you'll want a separate instance of memory
for all possible concurrent callers of ip_queue_xmit (you may need one per
active interface, because you can e transmitting packets on multiple interfaces
at the same time).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140102/711f1a02/attachment.bin 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help