From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4338 invoked by alias); 17 Jun 2004 13:01:27 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 4327 invoked from network); 17 Jun 2004 13:01:25 -0000 Received: from unknown (HELO anchor-post-30.mail.demon.net) (194.217.242.88) by sourceware.org with SMTP; 17 Jun 2004 13:01:25 -0000 Received: from calivar.demon.co.uk ([83.104.54.243] helo=xl5.calivar.com) by anchor-post-30.mail.demon.net with esmtp (Exim 3.35 #1) id 1BawW8-000MVd-0U; Thu, 17 Jun 2004 14:01:20 +0100 Received: from xl5.calivar.com (localhost [127.0.0.1]) by xl5.calivar.com (Postfix) with ESMTP id 46001DE4A; Thu, 17 Jun 2004 14:01:20 +0100 (BST) To: Andrew Lunn Cc: ?yvind Harboe , ecos-discuss@sources.redhat.com References: <1087469710.31564.11.camel@famine> <20040617121021.GB20791@lunn.ch> From: Nick Garnett Date: Thu, 17 Jun 2004 13:01:00 -0000 In-Reply-To: <20040617121021.GB20791@lunn.ch> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [ECOS] New memory allocation debug feature X-SW-Source: 2004-06/txt/msg00165.txt.bz2 Andrew Lunn writes: > On Thu, Jun 17, 2004 at 12:55:11PM +0200, ?yvind Harboe wrote: > > Comments? > > I would prefer the function to use the cyg_ prefix so it does not > polute the namespace. To underline this, the naming convention for eCos is to separate words in a name with underscores, not to use capitalization. Names should also contain the subsystem that they belong to and be descriptive of what they do. I think that the function should probably also have some arguments indicating, at least, the size of allocation that failed and the memory pool that has been exhausted. So I would like to see something more like: __externC void cyg_memalloc_alloc_fail( CYG_ADDRESS pool, cyg_uint32 size ); In theory this whole thing should be better integrated into the C++ classes that implement the memory allocators, but having an external function to call is an acceptable first step. > > You also need to provide an implementation in libtarget.a for when the > application does not have such a function. eg all the test programs > will not provide this function, so will fail to link when your new > option is enabled. So please add a week function which does nothing, > or maybe throws an CYG_FAIL(). s/week/weak/ :-) -- Nick Garnett eCos Kernel Architect http://www.ecoscentric.com/ The eCos and RedBoot experts -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss