From f86ceea099cb2b3fe1090fd30168dc80e55d5cec Mon Sep 17 00:00:00 2001 From: Abdelatif Guettouche Date: Sat, 31 Jul 2021 17:17:21 +0200 Subject: [PATCH] mm/mm_heap/mm.h: Fix some typos. Signed-off-by: Abdelatif Guettouche --- 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 15651160b4..141920f6d1 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 854f05bcad..22df38631a 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 cf6f2070d0..9156111654 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 3695d0b57a..598f553637 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. */