[MOAB-dev] r5297 - in MOAB/trunk: src/parallel tools/mbcoupler

jvporter at wisc.edu jvporter at wisc.edu
Fri Jan 6 16:09:11 CST 2012


Author: jvporter
Date: 2012-01-06 16:09:11 -0600 (Fri, 06 Jan 2012)
New Revision: 5297

Modified:
   MOAB/trunk/src/parallel/errmem.h
   MOAB/trunk/tools/mbcoupler/errmem.h
Log:
Sync errmem.h properly


Modified: MOAB/trunk/src/parallel/errmem.h
===================================================================
--- MOAB/trunk/src/parallel/errmem.h	2012-01-06 22:03:23 UTC (rev 5296)
+++ MOAB/trunk/src/parallel/errmem.h	2012-01-06 22:09:11 UTC (rev 5297)
@@ -32,6 +32,14 @@
   return res;
 }
 
+static void *scalloc(size_t nmemb, size_t size, const char *file)
+{
+  void *res = calloc(nmemb, size);
+  if(!res && nmemb)
+    fail("%s: allocation of %d bytes failed\n",file,(int)size*nmemb);
+  return res;
+}
+
 static void *srealloc(void *ptr, size_t size, const char *file)
 {
   void *res = realloc(ptr, size);

Modified: MOAB/trunk/tools/mbcoupler/errmem.h
===================================================================
--- MOAB/trunk/tools/mbcoupler/errmem.h	2012-01-06 22:03:23 UTC (rev 5296)
+++ MOAB/trunk/tools/mbcoupler/errmem.h	2012-01-06 22:09:11 UTC (rev 5297)
@@ -32,6 +32,14 @@
   return res;
 }
 
+static void *scalloc(size_t nmemb, size_t size, const char *file)
+{
+  void *res = calloc(nmemb, size);
+  if(!res && nmemb)
+    fail("%s: allocation of %d bytes failed\n",file,(int)size*nmemb);
+  return res;
+}
+
 static void *srealloc(void *ptr, size_t size, const char *file)
 {
   void *res = realloc(ptr, size);














More information about the moab-dev mailing list