> On (15 May 97) Louis Rizzuto wrote to Carey Bloodworth...
> LR> Is it plausible to write such RT apps in C++ - and still meet real
> LR> time criteria? I am not sure. Perhaps some else here can comment
> LR> on this.
> Yes. There's not a lot of difference between doing RT
> programming in
> C and in C++. In both cases, there are some obvious
> restrictions such
> as on using dynamic memory allocation unless your library has
> an
> allocator with know worst-case speed.
> One thing that does change is that typical C++ programs _do_
> tend to use
> dynamic allocation more than their C counterparts, at least
> in my
> experience. Likewise, it's not necessarily as easy to "see"
> which
> things are likely to consume time by examining source code.
> For
> instance in C an assignment statement:
> a = b;
> is always going to be relatively simple and straightforward.
> About the
> only time it's going to consume significant time is if `a'
> and `b' are
> struct's of relatively large size.
> However, in C++, that same assignment statement might
> disguise an
> arbitrary amount of complex code, and may well involve a
> number of
> function calls.
> However, in both cases things come out more or less the same
> in any
> case: you've got to find your absolute worst-case path
> through the code
> and you've got to verify that it's within requirements.
Thanks for replying Jerry. In Real Time apps, both memory and execution time
are often critical. I agree that typically C++ pgms use dynamic allocation
of memory but I wonder if this is adviseable in a C++ RT app due to typical
RT memory constraints.
C++ complex generated code may add to the problem of controlling both
memory and execution times. C++ is primarily a language noted for
reuseability of code; but are RT apps so similar that they would benefit from
such reuseabilty? If the guess that C++ can be used in a RT envirnment
proves to be a fiasco backing off and back to 'C' and ass'y may cancel out
any perceived labor benefits from using C++.
What do you think, Jerry?
For that matter why not use Java since it claims portabilty and is coming on
strong as the future development environment?
Regards, -= Lou =-
---
---------------
* Origin: ®ÄÄÍÍChicago Ÿire BBSÍÍÄį (1:2624/603)
|