Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename sup-mmap.c into mmorecore.c and simplify the code since we want no more than...
[simgrid.git] / src / xbt / mmalloc / mmprivate.h
index f351b59..3767365 100644 (file)
@@ -165,17 +165,6 @@ struct mdesc {
      preserved for future examination. */
   int saved_errno;
 
-  /* Pointer to the function that is used to get more core, or return core
-     to the system, for requests using this malloc descriptor.  For memory
-     mapped regions, this is the mmap() based routine.  There may also be
-     a single malloc descriptor that points to an sbrk() based routine
-     for systems without mmap() or for applications that call the mmalloc()
-     package with a NULL malloc descriptor.
-
-     FIXME:  For mapped regions shared by more than one process, this
-     needs to be maintained on a per-process basis. */
-  void *(*morecore) (struct mdesc * mdp, int size);
-
   /* Number of info entries.  */
   size_t heapsize;
 
@@ -268,6 +257,11 @@ extern void *__mmalloc_mmap_morecore(struct mdesc *mdp, int size);
 
 extern void *__mmalloc_remap_core(struct mdesc *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
+    like sbrk(), but using mmap(). */
+extern void *mmorecore(struct mdesc *mdp, int size);
+
 /* Macro to convert from a user supplied malloc descriptor to pointer to the
    internal malloc descriptor.  If the user supplied descriptor is NULL, then
    use the default internal version, initializing it if necessary.  Otherwise