From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] use symbols rather than constant vars in kvm_create Date: Sun, 03 Jun 2007 12:45:23 +0300 Message-ID: <46628DB3.60502@qumranet.com> References: <9cde8bff0706030235p2e20c9e8k3cccae1b75835887@mail.gmail.com> <46628BBA.3090107@qumranet.com> <9cde8bff0706030241l1253cce8k99a24ce942205c51@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Nguyen Anh Quynh Return-path: In-Reply-To: <9cde8bff0706030241l1253cce8k99a24ce942205c51-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Nguyen Anh Quynh wrote: > On 6/3/07, Avi Kivity wrote: >> Nguyen Anh Quynh wrote: >> > This patch replaces 2 constant variables "dosmem" and "exmem" in >> > kvm_create() with symbols. >> >> What is the benefit of this? Readability is not improved. >> >> > > yes, but what is the reason to use vars instead of symbols here? do > you want to waste some place in stack? > > i am not sure if gcc can optmize that, but there is no good reason to > use variables here. > gcc does optimize it, and even if it didn't, this function is called once per virtual machine. There's no reason to try to make it more efficient. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/