This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new f86ceea  mm/mm_heap/mm.h: Fix some typos.
f86ceea is described below

commit f86ceea099cb2b3fe1090fd30168dc80e55d5cec
Author: Abdelatif Guettouche <[email protected]>
AuthorDate: Sat Jul 31 17:17:21 2021 +0200

    mm/mm_heap/mm.h: Fix some typos.
    
    Signed-off-by: Abdelatif Guettouche <[email protected]>
---
 mm/mm_heap/mm.h              | 12 +++++++-----
 mm/mm_heap/mm_addfreechunk.c |  4 ++--
 mm/mm_heap/mm_initialize.c   |  2 +-
 mm/mm_heap/mm_malloc.c       |  2 +-
 4 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/mm/mm_heap/mm.h b/mm/mm_heap/mm.h
index 1565116..141920f 100644
--- a/mm/mm_heap/mm.h
+++ b/mm/mm_heap/mm.h
@@ -42,12 +42,12 @@
 
 /* Chunk Header Definitions *************************************************/
 
-/* These definitions define the characteristics of allocator
+/* These definitions define the characteristics of the allocator:
  *
  * MM_MIN_SHIFT is used to define MM_MIN_CHUNK.
- * MM_MIN_CHUNK - is the smallest physical chunk that can be allocated.  It
- *   must be at least a large as sizeof(struct mm_freenode_s).  Larger values
- *   may improve performance slightly, but will waste memory due to
+ * MM_MIN_CHUNK - is the smallest physical chunk that can be allocated.
+ *   It must be at least as large as sizeof(struct mm_freenode_s). Larger
+ *   values may improve performance slightly, but will waste memory due to
  *   quantization losses.
  *
  * MM_MAX_SHIFT is used to define MM_MAX_CHUNK
@@ -198,7 +198,9 @@ struct mm_heap_s
 
   struct mm_freenode_s mm_nodelist[MM_NNODES];
 
-  /* Free delay list, for some situation can't do free immdiately */
+  /* Free delay list, for some situations where we can't do free
+   * immdiately.
+   */
 
 #ifdef CONFIG_SMP
   FAR struct mm_delaynode_s *mm_delaylist[CONFIG_SMP_NCPUS];
diff --git a/mm/mm_heap/mm_addfreechunk.c b/mm/mm_heap/mm_addfreechunk.c
index 854f05b..22df386 100644
--- a/mm/mm_heap/mm_addfreechunk.c
+++ b/mm/mm_heap/mm_addfreechunk.c
@@ -38,8 +38,8 @@
  * Name: mm_addfreechunk
  *
  * Description:
- *   Add a free chunk to the node next.  It is assumed that the caller holds
- *   the mm semaphore
+ *   Add a free chunk to the nodes list.  It is assumed that the caller holds
+ *   the mm semaphore.
  *
  ****************************************************************************/
 
diff --git a/mm/mm_heap/mm_initialize.c b/mm/mm_heap/mm_initialize.c
index cf6f207..9156111 100644
--- a/mm/mm_heap/mm_initialize.c
+++ b/mm/mm_heap/mm_initialize.c
@@ -88,7 +88,7 @@ void mm_addregion(FAR struct mm_heap_s *heap, FAR void 
*heapstart,
 
   DEBUGVERIFY(mm_takesemaphore(heap));
 
-  /* Adjust the provide heap start and size so that they are both aligned
+  /* Adjust the provided heap start and size so that they are both aligned
    * with the MM_MIN_CHUNK size.
    */
 
diff --git a/mm/mm_heap/mm_malloc.c b/mm/mm_heap/mm_malloc.c
index 3695d0b..598f553 100644
--- a/mm/mm_heap/mm_malloc.c
+++ b/mm/mm_heap/mm_malloc.c
@@ -160,7 +160,7 @@ FAR void *mm_malloc(FAR struct mm_heap_s *heap, size_t size)
     }
 
   /* If we found a node with non-zero size, then this is one to use. Since
-   * the list is ordered, we know that is must be best fitting chunk
+   * the list is ordered, we know that it must be the best fitting chunk
    * available.
    */
 

Reply via email to