mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user