[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/6] mm: grub_real_malloc: make small allocs comment match code
From: |
Daniel Axtens |
Subject: |
[PATCH 3/6] mm: grub_real_malloc: make small allocs comment match code |
Date: |
Thu, 25 Nov 2021 02:22:47 +1100 |
Small allocations move the region's *first pointer. The comment
says that this happens for allocations under 64K. The code says
it's for allocations under 32K. Commit 45bf8b3a7549 changed the
code intentionally: make the comment match.
Fixes: 45bf8b3a7549 (" * grub-core/kern/mm.c (grub_real_malloc): Decrease
cut-off of moving the")
Signed-off-by: Daniel Axtens <dja@axtens.net>
---
grub-core/kern/mm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/kern/mm.c b/grub-core/kern/mm.c
index 6efabe92df0e..ac41cf4aab15 100644
--- a/grub-core/kern/mm.c
+++ b/grub-core/kern/mm.c
@@ -306,7 +306,7 @@ grub_real_malloc (grub_mm_header_t *first, grub_size_t n,
grub_size_t align)
/* Mark find as a start marker for next allocation to fasten it.
This will have side effect of fragmenting memory as small
pieces before this will be un-used. */
- /* So do it only for chunks under 64K. */
+ /* So do it only for chunks under 32K. */
if (n < (0x8000 >> GRUB_MM_ALIGN_LOG2)
|| *first == cur)
*first = prev;
--
2.32.0
- [PATCH 0/6] Document mm, Daniel Axtens, 2021/11/24
- [PATCH 1/6] mm: document grub internal memory management structures, Daniel Axtens, 2021/11/24
- [PATCH 4/6] mm: document grub_free, Daniel Axtens, 2021/11/24
- [PATCH 3/6] mm: grub_real_malloc: make small allocs comment match code,
Daniel Axtens <=
- [PATCH 5/6] mm: document grub_mm_init_region, Daniel Axtens, 2021/11/24
- [PATCH 6/6] [RFC] docs: document mm, Daniel Axtens, 2021/11/24
- [PATCH 2/6] mm: clarify grub_real_malloc, Daniel Axtens, 2021/11/24