Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics: fix "Malformed whitespace in C++" spotted by codefactor.io.
[simgrid.git] / src / xbt / mmalloc / mmprivate.h
index 46fe161..2d7af4a 100644 (file)
@@ -1,6 +1,6 @@
 /* Declarations for `mmalloc' and friends. */
 
-/* Copyright (c) 2010-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2020. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -51,7 +51,7 @@
 #define BLOCKIFY(SIZE)  (((SIZE) + BLOCKSIZE - 1) / BLOCKSIZE)
 
 /* We keep fragment-specific meta-data for introspection purposes, and these
- * information are kept in fixed lenght arrays. Here is the computation of
+ * information are kept in fixed length arrays. Here is the computation of
  * that size.
  *
  * Never make SMALLEST_POSSIBLE_MALLOC smaller than sizeof(list) because we
@@ -94,7 +94,7 @@
 
 #define ADDRESS(B) ((void*) (((ADDR2UINT(B)) - 1) * BLOCKSIZE + (char*) mdp -> heapbase))
 
-SG_BEGIN_DECL()
+SG_BEGIN_DECL
 
 /* Doubly linked lists of free fragments.  */
 struct list {
@@ -176,7 +176,6 @@ typedef struct {
  * if such a file exists.
  * */
 struct mdesc {
-
   /** @brief Mutex locking the access to the heap */
   pthread_mutex_t mutex;
 
@@ -226,7 +225,7 @@ struct mdesc {
 
   /* @brief List of all blocks containing free fragments of a given size.
    *
-   * The array indice is the log2 of requested size.
+   * The array index is the log2 of requested size.
    * Actually only the sizes 8->11 seem to be used, but who cares? */
   s_xbt_swag_t fraghead[BLOCKLOG];
 
@@ -261,7 +260,6 @@ struct mdesc {
 
   /* @brief Instrumentation */
   struct mstats heapstats;
-
 };
 
 /* Bits to look at in the malloc descriptor flags word */
@@ -276,7 +274,7 @@ XBT_PUBLIC_DATA struct mdesc* __mmalloc_default_mdp;
 
 /* Remap a mmalloc region that was previously mapped. */
 
-XBT_PUBLIC void* __mmalloc_remap_core(xbt_mheap_t mdp);
+XBT_PUBLIC void* __mmalloc_remap_core(const s_xbt_mheap_t* mdp);
 
 XBT_PUBLIC void* mmorecore(struct mdesc* mdp, ssize_t size);
 
@@ -293,6 +291,6 @@ XBT_PRIVATE int malloc_use_mmalloc(void);
 
 XBT_PRIVATE size_t mmalloc_get_bytes_used_remote(size_t heaplimit, const malloc_info* heapinfo);
 
-SG_END_DECL()
+SG_END_DECL
 
 #endif