From owner-cvs-all Mon Feb 1 21:35:23 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA13526 for cvs-all-outgoing; Mon, 1 Feb 1999 21:35:23 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.26.10.9]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA13512 for ; Mon, 1 Feb 1999 21:35:16 -0800 (PST) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id QAA19993; Tue, 2 Feb 1999 16:35:13 +1100 Date: Tue, 2 Feb 1999 16:35:13 +1100 From: Bruce Evans Message-Id: <199902020535.QAA19993@godzilla.zeta.org.au> To: mjacob@feral.com, wollman@khavrinen.lcs.mit.edu Subject: Re: sizeof (ptr) != sizeof (unsigned) Cc: cvs-commiters@FreeBSD.ORG Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk >> > bcopy(&p1->p_procsig->ps_begincopy, &p2->p_procsig->ps_begincopy, >> > (unsigned)&p1->p_procsig->ps_endcopy - >> > (unsigned)&p1->p_procsig->ps_begincopy); >> >> > What's this for? >> >> This copies just the part of the proc struct that's supposed to be >> copied. It would be cleaner if the operands were cast to `char *', >> but it should work either way on any processor architecture the kernel > > >Not if the cast to unsigned truncates the top 32 bits on an alpha I initially thought that this isn't a problem. It is a problem if the address range crosses a 4G boundary. I guess it still isn't a problem even if the alpha kernel covers more than 4G virtual, since proc structs are malloc()ed so they don't even cross a page boundary if they are no larger than 1 page. >prior to >(re)promoting it to caddr_t for the call to bcopy... No, the arg is a size_t, not a pointer. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message