Re: IS this a proper way of freeing memory with free()
- From: Ian Collins <ian-news@xxxxxxxxxxx>
- Date: Sat, 10 Feb 2007 08:27:02 +1300
Richard Heathfield wrote:
Ian Collins said:I had noticed...
Richard Heathfield wrote:
Fine, in which case it isn't C++, so you don't need the cast on
malloc.
I'm not sure if you are being deliberately obtuse.
No, I'm usually pretty acute.
The value gained form being able to test drivers or a complete embeddedMy point is there is sometimes value in having C code which is valid
C++. The driver code in question is compiled as C for the embedded
target, but compiled with the host C++ compiler for testing in a
hardware simulator.
Not wise, in my opinion. Your test environment does not adequately
reflect your production environment.
system off the target. We built up a very accurate simulation of the
micro we were using which enabled us to fully test our software before
we had hardware.
Is there a common subset of Perl and COBOL?
You wouldn't try to pull that
stunt with Perl on the target and COBOL on the simulator, would you? So
why do it with C and C++?
Yes, and we back that up with acceptance tests that run against the
So the code in question is written in the subset of C that is valid
C++.
With identical semantics? Are you *sure*? And once you've answered in
the affirmative, ask yourself whether you are *really* sure.
simulation and the final product.
--
Ian Collins.
.
- Follow-Ups:
- Re: IS this a proper way of freeing memory with free()
- From: Keith Thompson
- Re: IS this a proper way of freeing memory with free()
- References:
- IS this a proper way of freeing memory with free()
- From: Raman
- Re: IS this a proper way of freeing memory with free()
- From: Yevgen Muntyan
- Re: IS this a proper way of freeing memory with free()
- From: Yevgen Muntyan
- Re: IS this a proper way of freeing memory with free()
- From: Walter Roberson
- Re: IS this a proper way of freeing memory with free()
- From: Yevgen Muntyan
- Re: IS this a proper way of freeing memory with free()
- From: Christopher Layne
- Re: IS this a proper way of freeing memory with free()
- From: Yevgen Muntyan
- Re: IS this a proper way of freeing memory with free()
- From: Christopher Layne
- Re: IS this a proper way of freeing memory with free()
- From: Yevgen Muntyan
- Re: IS this a proper way of freeing memory with free()
- From: Flash Gordon
- Re: IS this a proper way of freeing memory with free()
- From: Yevgen Muntyan
- Re: IS this a proper way of freeing memory with free()
- From: Mark McIntyre
- Re: IS this a proper way of freeing memory with free()
- From: Yevgen Muntyan
- Re: IS this a proper way of freeing memory with free()
- From: Richard Heathfield
- Re: IS this a proper way of freeing memory with free()
- From: Ian Collins
- Re: IS this a proper way of freeing memory with free()
- From: Richard Heathfield
- Re: IS this a proper way of freeing memory with free()
- From: Ian Collins
- Re: IS this a proper way of freeing memory with free()
- From: Richard Heathfield
- Re: IS this a proper way of freeing memory with free()
- From: Ian Collins
- Re: IS this a proper way of freeing memory with free()
- From: Richard Heathfield
- IS this a proper way of freeing memory with free()
- Prev by Date: Re: Horror! Using goto statement in finite state machines?
- Next by Date: Re: Horror! Using goto statement in finite state machines?
- Previous by thread: Re: IS this a proper way of freeing memory with free()
- Next by thread: Re: IS this a proper way of freeing memory with free()
- Index(es):
Relevant Pages
|