Call PACKET_RELEASE_REFS from PacketPoolGetPacket() so that
we only access the large packet structure just before actually
using it. Should give better cache behaviour.
Packet *p = pool->head;
pool->head = p->next;
p->pool = pool;
+ PACKET_REINIT(p);
return p;
}
Packet *p = pool->head;
pool->head = p->next;
p->pool = pool;
+ PACKET_REINIT(p);
return p;
}
{
PktPool *my_pool = GetThreadPacketPool();
+ PACKET_RELEASE_REFS(p);
+
PktPool *pool = p->pool;
if (pool == NULL) {
free(p);
return;
}
- PACKET_RECYCLE(p);
-
if (pool == my_pool) {
/* Push back onto this thread's own stack, so no locking. */
p->next = my_pool->head;