]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
mm: grub_real_malloc(): Make small allocs comment match code
authorDaniel Axtens <dja@axtens.net>
Wed, 24 Nov 2021 15:22:47 +0000 (02:22 +1100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 23 Dec 2021 02:02:20 +0000 (03:02 +0100)
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>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/kern/mm.c

index 6efabe92df0ef66c25d2176aa3a10f84dd079c7c..ac41cf4aab154563bb6bf4b34c7dba0c06283968 100644 (file)
@@ -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;