diff options
author | Melanie | 2009-09-30 21:30:08 +0100 |
---|---|---|
committer | Melanie | 2009-09-30 21:33:29 +0100 |
commit | 79ba96ad6f6536fcd0cff40e2f8b85b7aa176831 (patch) | |
tree | 8b1e4d919fd341afa2590536b9fd3a3748d23944 /OpenSim | |
parent | Add RebakeAvatarTexturesPacket to the client view (diff) | |
download | opensim-SC_OLD-79ba96ad6f6536fcd0cff40e2f8b85b7aa176831.zip opensim-SC_OLD-79ba96ad6f6536fcd0cff40e2f8b85b7aa176831.tar.gz opensim-SC_OLD-79ba96ad6f6536fcd0cff40e2f8b85b7aa176831.tar.bz2 opensim-SC_OLD-79ba96ad6f6536fcd0cff40e2f8b85b7aa176831.tar.xz |
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
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/PacketPool.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenSim/Framework/PacketPool.cs b/OpenSim/Framework/PacketPool.cs index 8075ce6..7e2860e 100644 --- a/OpenSim/Framework/PacketPool.cs +++ b/OpenSim/Framework/PacketPool.cs | |||
@@ -234,7 +234,8 @@ namespace OpenSim.Framework | |||
234 | 234 | ||
235 | lock (DataBlocks) | 235 | lock (DataBlocks) |
236 | { | 236 | { |
237 | DataBlocks[typeof(T)].Push(block); | 237 | if (DataBlocks[typeof(T)].Count < 50) |
238 | DataBlocks[typeof(T)].Push(block); | ||
238 | } | 239 | } |
239 | } | 240 | } |
240 | } | 241 | } |