From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E7z7P-0002m6-UJ for qemu-devel@nongnu.org; Wed, 24 Aug 2005 13:32:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E7z7L-0002lg-VC for qemu-devel@nongnu.org; Wed, 24 Aug 2005 13:32:52 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E7z5g-0001gx-46 for qemu-devel@nongnu.org; Wed, 24 Aug 2005 13:31:08 -0400 Received: from [64.233.184.201] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E7ySy-0000Nd-1H for qemu-devel@nongnu.org; Wed, 24 Aug 2005 12:51:08 -0400 Received: by wproxy.gmail.com with SMTP id i21so131623wra for ; Wed, 24 Aug 2005 09:50:00 -0700 (PDT) Message-ID: <23bcb8700508240949740cb763@mail.gmail.com> Date: Wed, 24 Aug 2005 12:49:58 -0400 From: Doctor Bill Subject: Re: [Qemu-devel] [PATCH] const / static (against current CVS) In-Reply-To: <200508241549.04816.paul@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050823174026.GA27203@rhlx01.fht-esslingen.de> <200508241441.45656.paul@codesourcery.com> <20050824143851.GA24595@rhlx01.fht-esslingen.de> <200508241549.04816.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Wed, Aug 24, 2005 at 02:41:44PM +0100, Paul Brook wrote: > > Probably more important is to make sure none constant data structures > > are done on the stack. There is no good reason why any code page > > should be read-write. > > Huh? this is nonsense. I stand corrected, I ment to say on the stack or in the heap. ie. I was only refering within the scope of the original post. The point is you don't want self modifing code. In rare circumstances you need self modifing code, but it is very rare. While it possible to mark allocated pages as read only, this usually only done for runtime error detection and sometimes thread saftey. Pretty much all modern operating systems do copy on write. However, this is completely beyond the scope of our discussion. Bill