Index: /issm/trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp	(revision 12439)
+++ /issm/trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp	(revision 12440)
@@ -171,5 +171,5 @@
 	int noerr=1;
 	int i,j,k,ipt,jpt,irow,icol,ipiv,ncol;
-	int (*pivrc)[2],*pindx;
+	int *pivrc1,*pivrc2,*pindx;
 	double pivot,det,dtemp;
 
@@ -217,6 +217,6 @@
 		}
 
-		pivrc[i][0]=irow;
-		pivrc[i][1]=icol;
+		pivrc1[i]=irow;
+		pivrc2[i]=icol;
 
 		ipiv=icol;
@@ -308,7 +308,7 @@
 		j=(nrow-1)-i;
 
-		if (pivrc[j][0] != pivrc[j][1]) {
-			irow=pivrc[j][0];
-			icol=pivrc[j][1];
+		if (pivrc1[j] != pivrc2[j]) {
+			irow=pivrc1[j];
+			icol=pivrc2[j];
 
 //			_printf_(true,"column switch back for j=%d: irow=%d, icol=%d\n",
@@ -330,5 +330,4 @@
 	xfree((void**)&pivrc);
 	xDelete<int>(pindx);
-
 	return noerr;
 }/*}}}*/
Index: /issm/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12439)
+++ /issm/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12440)
@@ -61,5 +61,5 @@
 
 	/*ok, grab the option string: */
-	outstring=(char*)xmalloc((strlen(strings[found])+1)*sizeof(char));
+	outstring=xNew<char>(strlen(strings[found])+1);
 	strcpy(outstring,strings[found]);
 
Index: /issm/trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp	(revision 12439)
+++ /issm/trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp	(revision 12440)
@@ -3,5 +3,5 @@
  */
 #include "./trimesh.h"
-
+#include "../Alloc/xNewDelete.h"
 #include "../Alloc/alloc.h"
 
@@ -52,5 +52,5 @@
 
 	/*Go through all nodes of the rift segments, and start splitting the mesh: */
-	flags=(int*)xcalloc(nods,sizeof(int)); //to make sure we don't split the same nodes twice!
+	flags=xNewInit<int>(nods,0); //to make sure we don't split the same nodes twice!
 	for (i=0;i<nriftsegs;i++){
 		for (j=0;j<2;j++){
Index: /issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12439)
+++ /issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12440)
@@ -129,5 +129,5 @@
 
 	/*Allocate segmentflags: */
-	riftsegments_uncompressed=(int*)xcalloc(nsegs*5,sizeof(int));
+	riftsegments_uncompressed=xNewInit<int>(nsegs*5,0);
 
 	/*Find the segments that belong to a rift: they are the ones that see two elements. The other ones belong to a boundary 
