#endif
#include "mmprivate.h"
#include "xbt/ex.h"
-#include "src/xbt_modinter.h" /* declarations of mmalloc_preinit and friends that live here */
+#include "xbt/xbt_modinter.h" /* declarations of mmalloc_preinit and friends that live here */
#ifndef SEEK_SET
#define SEEK_SET 0
if (fd >= 0) {
if (fstat(fd, &sbuf) < 0)
- return (NULL);
+ return NULL;
else if (sbuf.st_size > 0) {
/* We were given a valid file descriptor on an open file, so try to remap
/* NULL is not a valid baseaddr as we cannot map anything there. C'mon, user. Think! */
if (baseaddr == NULL)
- return (NULL);
+ return NULL;
/* We start off with the malloc descriptor allocated on the stack, until we build it up enough to
* call _mmalloc_mmap_morecore() to allocate the first page of the region and copy it there. Ensure that it is
}
}
- return (mdp);
+ return mdp;
}
/* Safety gap from the heap's break address.
}
/* Initialize the default malloc descriptor. */
-void *mmalloc_preinit(void)
+xbt_mheap_t mmalloc_preinit(void)
{
if (__mmalloc_default_mdp == NULL) {
if(!xbt_pagesize)