X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/652114f194de013d00c485df901535bc83acb73b..47a73b5d8591f5405691f45ee0c5884807ea7471:/src/xbt/mmalloc/mcalloc.c diff --git a/src/xbt/mmalloc/mcalloc.c b/src/xbt/mmalloc/mcalloc.c index 6c26022a04..f80953f85a 100644 --- a/src/xbt/mmalloc/mcalloc.c +++ b/src/xbt/mmalloc/mcalloc.c @@ -7,33 +7,20 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include /* GCC on HP/UX needs this before string.h. */ -#include /* Prototypes for memcpy, memmove, memset, etc */ +#include /* GCC on HP/UX needs this before string.h. */ +#include /* Prototypes for memcpy, memmove, memset, etc */ #include "mmprivate.h" /* Allocate an array of NMEMB elements each SIZE bytes long. The entire array is initialized to zeros. */ -void * -mcalloc (void *md, register size_t nmemb, register size_t size) +void *mcalloc(void *md, register size_t nmemb, register size_t size) { - register void* result; + register void *result; - if ((result = mmalloc (md, nmemb * size)) != NULL) - { - memset (result, 0, nmemb * size); - } + if ((result = mmalloc(md, nmemb * size)) != NULL) { + memset(result, 0, nmemb * size); + } return (result); } - -/* When using this package, provide a version of malloc/realloc/free built - on top of it, so that if we use the default sbrk() region we will not - collide with another malloc package trying to do the same thing, if - the application contains any "hidden" calls to malloc/realloc/free (such - as inside a system library). - FIXME: disabled for now */ - -//void* calloc (size_t nmemb, size_t size) { -// return (mcalloc ((void*) NULL, nmemb, size)); -//}