mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
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.
This commit is contained in:
@@ -47,6 +47,8 @@ namespace OpenSim.Region.Physics.Manager
|
||||
int[] getIndexListAsInt();
|
||||
int[] getIndexListAsIntLocked();
|
||||
float[] getVertexListAsFloatLocked();
|
||||
void getIndexListAsPtrToIntArray(out IntPtr indices, out int triStride, out int indexCount);
|
||||
void getVertexListAsPtrToFloatArray( out IntPtr vertexList, out int vertexStride, out int vertexCount );
|
||||
void releaseSourceMeshData();
|
||||
void releasePinned();
|
||||
void Append(IMesh newMesh);
|
||||
|
||||
Reference in New Issue
Block a user