cjohns at cybertec.com.au
Wed Aug 27 01:32:31 UTC 2003
Francesco Poletti wrote:
> The main questions is: does someone know how the new() functions is linked to
> RTEMS and in particoularly with the rtems_region_allocator or the heap?
The new allocator is in the stdc++. Look for the file in GCC source:
for an example of new. It uses malloc to get the memory and malloc is part of the
libcsupport section of RTEMS.
The code as a link can be view online here:
> I have also try to see where may have been defined the "new()" functions but I
> don't found it.
It is in libstdc++.a. For a Coldfire I can do:
$ m68k-rtems-nm --demangle `m68k-rtems-gcc -print-file-name=libstdc++.a` | grep new
and get a list of the various new operators in the library.
> Need I to manually add this functions and to link it with one allocator?
Standard allocators are provided in stdc++ and using g++ to link will automatically
link in stdc++.
Chris Johns, cjohns at cybertec . com . au
More information about the users