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: callback functionality for dyanmic memory allocation


On Saturday 02 November 2002 02:00 pm, Gary Thomas wrote:
> On Fri, 2002-11-01 at 21:25, NavEcos wrote:
> > The following patches allows a user to track:
> >
> > 1) heap creation
> > 2) heap destruction
> > 3) allocation/freeing of dynamic memory
> >     and
> > 4) reallocation of dynamic memory (i.e. realloc functionality)
> >
> > Included is the CDL to control it.  By default it is turned off.  There
> > will be a performance penalty to turn on the logging ability even if you
> > do not use it since a pointer must be checked (the callback).
>
> But surely not if it's disabled by CDL?

Oh yes, of course.  Sorry, that does appear vague doesn't it?

If the CDL disables the option, there will be no performance penalty at all.  
By default the CDL option is disabled.  I.E. by default, this shouldn't 
change anybody's build.

> Also, how about writing a test or two?  These are the best examples
> we can provide the public of anything that gets added.
>
> Thanks.  (I'll let Jonathan comment on the patch as a whole)

I am using the addtional functionality already - but before I publish 
examples, I think it would be best to see what eCosCentric thinks.  I expect 
there will be some discussion about changes -> once the additional API's are 
solidified I'll be happy to produce examples.

Also, to help understand it: the dlmalloc and variable heaps have nearly 
identical APIs but the fixed alloc is a bit different.

If you have any questions, feel free to ask.

Thanks,
-Rich


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