From: Nick Garnett <nickg@ecoscentric.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: ?yvind Harboe <oyvind.harboe@zylin.com>, ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] New memory allocation debug feature
Date: Thu, 17 Jun 2004 13:01:00 -0000 [thread overview]
Message-ID: <m3llimnxsw.fsf@xl5.calivar.com> (raw)
In-Reply-To: <20040617121021.GB20791@lunn.ch>
Andrew Lunn <andrew@lunn.ch> 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
next prev parent reply other threads:[~2004-06-17 13:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-17 10:55 Øyvind Harboe
2004-06-17 12:10 ` Andrew Lunn
2004-06-17 13:01 ` Nick Garnett [this message]
2004-06-17 14:30 ` Øyvind Harboe
2004-06-18 11:58 ` Andrew Lunn
2004-06-18 15:06 ` Øyvind Harboe
2004-06-18 21:42 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3llimnxsw.fsf@xl5.calivar.com \
--to=nickg@ecoscentric.com \
--cc=andrew@lunn.ch \
--cc=ecos-discuss@sources.redhat.com \
--cc=oyvind.harboe@zylin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).