This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: new memory debug feature


On Thu, 2004-07-01 at 13:10, Nick Garnett wrote:
> 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

I broke the dependency on the kernel by adding a duplicate prototype of
cyg_memalloc_alloc_fail() to common.hxx.


-- 
Øyvind Harboe
http://www.zylin.com

Attachment: memdebug4.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]