X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/70b06ee68762a9c1d43dcc20e2e33b977f5eb0cd..d8ab922a070441ad80ad86b93b40bc7e1fd4a7d1:/src/xbt/mmalloc/mmap-sup.c diff --git a/src/xbt/mmalloc/mmap-sup.c b/src/xbt/mmalloc/mmap-sup.c index ad2692cc17..28f89bc386 100644 --- a/src/xbt/mmalloc/mmap-sup.c +++ b/src/xbt/mmalloc/mmap-sup.c @@ -109,9 +109,11 @@ void *__mmalloc_mmap_morecore(struct mdesc *mdp, int size) foffset = (char *) mdp->top - (char *) mdp->base; if (mdp->fd > 0) { - /* FIXME: Test results of lseek() and write() */ + /* FIXME: Test results of lseek() */ lseek(mdp->fd, foffset + mapbytes - 1, SEEK_SET); test = write(mdp->fd, &buf, 1); + if (test == -1) + THROWF(system_error, 0, "write to mmap'ed fd failed! error: %s", strerror(errno)); } /* Let's call mmap. Note that it is possible that mdp->top