current memory when allocating large chunks. This significantly
decreases memory fragmentation.
+2013-11-18 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/kern/mm.c (grub_real_malloc): Don't update the pointer to
+ current memory when allocating large chunks. This significantly
+ decreases memory fragmentation.
+
2013-11-18 Colin Watson <cjwatson@ubuntu.com>
* util/grub-mkrescue.c (main): Fix typo.
/* 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. */
- *first = q;
+ /* So do it only for chunks under 64K. */
+ if (n < (0x10000 >> GRUB_MM_ALIGN_LOG2)
+ || *first == p)
+ *first = q;
return p + 1;
}