This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: new memory debug feature
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: Andrew Lunn <andrew at lunn dot ch>
- Cc: ?yvind Harboe <oyvind dot harboe at zylin dot com>,ecos-patches at sources dot redhat dot com
- Date: 01 Jul 2004 12:10:19 +0100
- Subject: Re: new memory debug feature
- References: <1088076300.19249.8.camel@famine> <20040625142035.GB5877@lunn.ch><1088668854.6052.57.camel@famine> <20040701105550.GC11101@lunn.ch>
Andrew Lunn <andrew@lunn.ch> writes:
> On Thu, Jul 01, 2004 at 10:00:54AM +0200, ?yvind Harboe wrote:
> > I had to make some more changes to make it compile again.
> >
> > ><cyg/kernel/kapi.h> is not needed. In fact i think memalloc is
> > >independant of the kernel, so using this header file would be a bad
> > >idea since it might not exist.
> >
> > I had to add it back in since memalloc/common/current/include/kapi.h
> > depends on the definition on e.g. cyg_handle_t.
>
> Yes, i found that as well. But i don't want to make memalloc dependent
> on the kernel. Redboot makes use of it, and so breaks since redboot
> does not have the kernel included in the configuration. The prototype
> has to go somewhere else, maybe next to malloc in stdlib.h?
Better would be a conditional definition in
memalloc/common/current/include/kapi.h. Something like this:
#ifndef CYGPKG_KERNEL
typedef cyg_uint32 cyg_handle_t;
#endif
>
> Interesting. I could be i have the syntax wrong somehow. I will play
> with the arm compiler and see if i can get it to at least compile cleanly.
There are quite a lot of functions with weak attributes scattered
around the sources. Take a look, for example, at hal_spurious_IRQ() in
the ARM architecture HAL. There certainly shouldn't be any compiler
problems in this area, it's platform independent and has been working
for years.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts