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
prioritization
Melanie 2009-09-30 21:30:08 +01:00
parent 400abed271
commit 79ba96ad6f
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}
}
}