[Q] get_ma_area() function

From: Andrey Panin (pazke@orbita1.ru)
Date: Tue May 07 2002 - 06:58:54 EST


Hi,

looking at mm/vmalloc.c i found one strange (for me) line of code.

From mm/vmalloc.c:

struct vm_struct * get_vm_area(unsigned long size, unsigned long flags)
{
        unsigned long addr;
        struct vm_struct **p, *tmp, *area;

        area = (struct vm_struct *) kmalloc(sizeof(*area), GFP_KERNEL);
        if (!area)
                return NULL;
        size += PAGE_SIZE;
        ^^^^^^^^^^^^^^^^^^
Why ? Maybe size = PAGE_ALIGN(size); is more correct here ?

Best regards.

-- 
Andrey Panin            | Embedded systems software engineer
pazke@orbita1.ru        | PGP key: wwwkeys.eu.pgp.net


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 07 2002 - 22:00:29 EST