Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / xbt / mmalloc / attach.c
index 7963a46..254182e 100644 (file)
@@ -28,6 +28,7 @@ Boston, MA 02111-1307, USA.  */
 #include <unistd.h>             /* Prototypes for lseek */
 #endif
 #include "mmprivate.h"
+#include "xbt/ex.h"
 
 #ifndef SEEK_SET
 #define SEEK_SET 0
@@ -131,7 +132,7 @@ void *mmalloc_attach(int fd, void *baseaddr)
   if ((mbase = mdp->morecore(mdp, sizeof(mtemp))) != NULL) {
     memcpy(mbase, mdp, sizeof(mtemp));
   } else {
-    abort();
+    THROWF(system_error,0,"morecore failed to get some memory!");
   }
 
   /* Add the new heap to the linked list of heaps attached by mmalloc */