This is the mail archive of the ecos-discuss@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]

RE: Inside eCos : the new operator


> -----Original Message-----
> From: Bart Veer [mailto:bartv@redhat.com]
> Subject: Re: [ECOS] Inside eCos : the new operator
> 
> The invocation of the new() operator involves C++ 
> placement syntax,
> which is just part of the standard language.
> 
> If the code looks something like:
> 
>     Object* ptr = new Object(arg1, arg2);
> 
> then this invokes the default new operator, which will perform dynamic
> memory allocation - I suspect it would end up calling malloc(), but
> have not checked this.

In this case, I suspect this will fail if the libc is not compiled as a part
of eCos. In another message you mentionned the fact that eCos was not
written with dynamic allocation in mind so I wonder how it handle a
"dynamic" new operator. Does/Can it uses memory pools? 

> [...]
> I am not sure what gcc patch you are referring to.

The one I had to apply when building the gnu toolchain for eCos (as refered
in the eCos installation documentation)

Thanks

-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 

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