This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Inside eCos : the new operator
- To: "'bartv at redhat dot com'" <bartv at redhat dot com>
- Subject: RE: [ECOS] Inside eCos : the new operator
- From: Fabrice Gautier <Fabrice_Gautier at sdesigns dot com>
- Date: Mon, 21 Aug 2000 18:47:03 -0700
- Cc: ecos-discuss at sourceware dot cygnus dot com
> -----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