From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hopwood Subject: Re: [PATCH] Changes to allow dynamic enabling/disabling of trace buffers Date: Sun, 30 Oct 2005 23:02:41 +0000 Message-ID: <43655111.5050403@blueyonder.co.uk> References: <436537C9.1090301@hp.com> <43654ED6.5070604@blueyonder.co.uk> Reply-To: david.nospam.hopwood@blueyonder.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <43654ED6.5070604@blueyonder.co.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org David Hopwood wrote: > Rob Gardner wrote: > > // 3. Changing size ==> deallocate and reallocate? Or disallow? > // User can just do a change to 0, then a change to the new size. > > They can, but the interface is slightly simpler if you allow this, and > the implementation is also slightly shorter because you don't have to > check for the error, or comment on it: [...] > The sentence "To change the size of an existing allocation, you must first > deallocate it then reallocate it." should also be removed from the > xc_tbuf_set_size doc comment. For the implementation I gave, replace it with "If the call fails (e.g. due to lack of memory), the size may be set to zero." -- David Hopwood