diff options
author | Dan Lake | 2009-10-05 05:35:56 -0700 |
---|---|---|
committer | Melanie | 2009-10-05 12:45:41 +0100 |
commit | 6d52974c5f8184c03e3366fdcce03e4ec15c85f6 (patch) | |
tree | 7a1c7a7db8446b9f7bf59fcc367d347c5e00a50a /OpenSim/Region/Physics/Manager/IMesher.cs | |
parent | only cache mesh if meshing was successful (diff) | |
download | opensim-SC_OLD-6d52974c5f8184c03e3366fdcce03e4ec15c85f6.zip opensim-SC_OLD-6d52974c5f8184c03e3366fdcce03e4ec15c85f6.tar.gz opensim-SC_OLD-6d52974c5f8184c03e3366fdcce03e4ec15c85f6.tar.bz2 opensim-SC_OLD-6d52974c5f8184c03e3366fdcce03e4ec15c85f6.tar.xz |
Eliminate pinned Mesh data on managed heap by using IntPtrs to memory allocated on the unmanaged heap. This prevents fragmentation of the managed heap and the resulting stress on GC. A region with ~150,000 prims using ODE and Meshmerizer saw memory remain flat around 1.2GB as opposed to 1.5GB and continually growing due to pinned memory. This patch complements the unique mesh dictionary patch applied to Meshmerizer but is independent. The net effect is a 60-75% reduction in memory for our largest regions.
Diffstat (limited to 'OpenSim/Region/Physics/Manager/IMesher.cs')
-rw-r--r-- | OpenSim/Region/Physics/Manager/IMesher.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index e26c623..ac14292 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs | |||
@@ -47,6 +47,8 @@ namespace OpenSim.Region.Physics.Manager | |||
47 | int[] getIndexListAsInt(); | 47 | int[] getIndexListAsInt(); |
48 | int[] getIndexListAsIntLocked(); | 48 | int[] getIndexListAsIntLocked(); |
49 | float[] getVertexListAsFloatLocked(); | 49 | float[] getVertexListAsFloatLocked(); |
50 | void getIndexListAsPtrToIntArray(out IntPtr indices, out int triStride, out int indexCount); | ||
51 | void getVertexListAsPtrToFloatArray( out IntPtr vertexList, out int vertexStride, out int vertexCount ); | ||
50 | void releaseSourceMeshData(); | 52 | void releaseSourceMeshData(); |
51 | void releasePinned(); | 53 | void releasePinned(); |
52 | void Append(IMesh newMesh); | 54 | void Append(IMesh newMesh); |