Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / xbt / mmalloc / mmprivate.h
index fa9b62a..a9018c5 100644 (file)
@@ -33,7 +33,6 @@
 #define MMALLOC_MAGIC          "mmalloc"       /* Mapped file magic number */
 #define MMALLOC_MAGIC_SIZE     8       /* Size of magic number buf */
 #define MMALLOC_VERSION                1       /* Current mmalloc version */
-#define MMALLOC_KEYS           16      /* Keys for application use */
 
 /* The allocator divides the heap into blocks of fixed size; large
    requests receive one or more whole blocks, and small requests
@@ -93,8 +92,10 @@ typedef union {
         size_t nfree;           /* Free fragments in a fragmented block.  */
         size_t first;           /* First free fragment of the block.  */
       } frag;
-      /* Size (in blocks) of a large cluster.  */
-      size_t size;
+      struct {
+       size_t size; /* Size (in blocks) of a large cluster.  */
+       size_t busy_size; 
+      } block;
     } info;
   } busy;
   /* Heap information for a free block (that may be the first of
@@ -260,16 +261,11 @@ struct mdesc {
 
   int fd;
 
-  /* An array of keys to data within the mapped region, for use by the
-     application.  */
-
-  void *keys[MMALLOC_KEYS];
-
 };
 
-int mmalloc_compare_heap(void *h1, void *h2);
+int mmalloc_compare_heap(void *h1, void *h2, void *std_heap_addr);
 
-int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2);
+int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2, void *std_heap_addr);
 
 void mmalloc_display_info(void *h);