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. */
- 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);
- return ((void *) base);
}
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. */
-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