From 79ba96ad6f6536fcd0cff40e2f8b85b7aa176831 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 30 Sep 2009 21:30:08 +0100 Subject: [PATCH] Limit the number of packet data blocks to 50, as packets are already limited This is enough to prevent the fast back and forth of allocation and release the pool is meant to prevent, but not too much so we don't hog memory --- OpenSim/Framework/PacketPool.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Framework/PacketPool.cs b/OpenSim/Framework/PacketPool.cs index 8075ce632c..7e2860e07d 100644 --- a/OpenSim/Framework/PacketPool.cs +++ b/OpenSim/Framework/PacketPool.cs @@ -234,7 +234,8 @@ namespace OpenSim.Framework lock (DataBlocks) { - DataBlocks[typeof(T)].Push(block); + if (DataBlocks[typeof(T)].Count < 50) + DataBlocks[typeof(T)].Push(block); } } }