Skip to contentSkip to conversation

Trivial patch in the bootmem allocator

TRIVIAL Juan M. de la Torre 1 participant 1 message Sep 13, 2002 Memory management

lore
Share & tools
lore
#0 lore raw

If the requested align is PAGE_SIZE, it is impossible to merge with the
previous allocation request, because the allocated area must begin in a page boundary.

Regards,
Juanma

mm/bootmem.c Fri Sep 13 15:24:31 2002 renamed from mm/bootmem.c.orig Fri Sep 13 15:23:22 2002 +1 -1
@@ -205,7 +205,7 @@
         * of this allocation's buffer? If yes then we can 'merge'
         * the previous partial page with this allocation.
         */
-       if (align <= PAGE_SIZE
+       if (align < PAGE_SIZE
            && bdata->last_offset && bdata->last_pos+1 == start) {
                offset = (bdata->last_offset+align-1) & ~(align-1);
                if (offset > PAGE_SIZE)
Signature · 1 line
/jm