[Q] get_ma_area() function

Andrey Panin (pazke@orbita1.ru)
Tue, 7 May 2002 15:58:54 +0400


--/e2eDi0V/xtL+Mc8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

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

=46rom 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 =3D (struct vm_struct *) kmalloc(sizeof(*area), GFP_KERNEL);
if (!area)
return NULL;
size +=3D PAGE_SIZE;
^^^^^^^^^^^^^^^^^^
Why ? Maybe size =3D PAGE_ALIGN(size); is more correct here ?

Best regards.

--=20
Andrey Panin | Embedded systems software engineer
pazke@orbita1.ru | PGP key: wwwkeys.eu.pgp.net
--/e2eDi0V/xtL+Mc8
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE818F+Bm4rlNOo3YgRAp77AJ9s+2G2DUgieX5Bzg85nih65NpXmACfYjC4
l7Yz0VBbZ658/9l0+TFCy98=
=jz9v
-----END PGP SIGNATURE-----

--/e2eDi0V/xtL+Mc8--
-
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/