Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics and kill a now undeclared function prototype
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 2 Feb 2012 14:00:15 +0000 (15:00 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 2 Feb 2012 14:00:15 +0000 (15:00 +0100)
src/xbt/mmalloc/mmorecore.c
src/xbt/mmalloc/mmprivate.h

index 76ff04b..9d78336 100644 (file)
@@ -132,15 +132,12 @@ void *mmorecore(struct mdesc *mdp, int size)
   return (result);
 }
 
   return (result);
 }
 
-void *__mmalloc_remap_core(struct mdesc *mdp)
+void *__mmalloc_remap_core(xbt_mheap_t mdp)
 {
 {
-  void *base;
-
   /* FIXME:  Quick hack, needs error checking and other attention. */
 
   /* FIXME:  Quick hack, needs error checking and other attention. */
 
-  base = mmap(mdp->base, (char *) mdp->top - (char *) mdp->base,
+  return mmap(mdp->base, (char*) mdp->top - (char*) mdp->base,
               PROT_READ | PROT_WRITE | PROT_EXEC,
               MAP_PRIVATE_OR_SHARED(mdp) | MAP_FIXED, mdp->fd, 0);
               PROT_READ | PROT_WRITE | PROT_EXEC,
               MAP_PRIVATE_OR_SHARED(mdp) | MAP_FIXED, mdp->fd, 0);
-  return ((void *) base);
 }
 
 }
 
index 123b627..05cdf9a 100644 (file)
@@ -218,14 +218,9 @@ extern void __mmalloc_free(struct mdesc *mdp, void *ptr);
 
 extern struct mdesc *__mmalloc_default_mdp;
 
 
 extern struct mdesc *__mmalloc_default_mdp;
 
-/* Initialize the first use of the default malloc descriptor, which uses
-   an sbrk() region. */
-
-extern struct mdesc *__mmalloc_create_default_mdp(void);
-
 /* Remap a mmalloc region that was previously mapped. */
 
 /* Remap a mmalloc region that was previously mapped. */
 
-extern void *__mmalloc_remap_core(struct mdesc *mdp);
+extern void *__mmalloc_remap_core(xbt_mheap_t mdp);
 
 /*  Get core for the memory region specified by MDP, using SIZE as the
     amount to either add to or subtract from the existing region.  Works
 
 /*  Get core for the memory region specified by MDP, using SIZE as the
     amount to either add to or subtract from the existing region.  Works