mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
* grub-core/kern/mm.c (grub_real_malloc): Decrease cut-off of moving the
pointer to 32K. This is the size of cache element which is the most common allocation >1K. This way the pointer is always around blocks of 32K and so we keep performance while decreasing fragmentation.
This commit is contained in:
1 parent
39ff43c579
commit
45bf8b3a75
2 files changed
+8
-1
No files matched your search
+1
-1
@@ -299,7 +299,7 @@ grub_real_malloc (grub_mm_header_t *first, grub_size_t n, grub_size_t align)
|
||||
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. */
|
||||
if (n < (0x10000 >> GRUB_MM_ALIGN_LOG2)
|
||||
if (n < (0x8000 >> GRUB_MM_ALIGN_LOG2)
|
||||
|| *first == p)
|
||||
*first = q;
|
||||
|
||||
|
||||
Reference in new issue
Block a user