Hi,
Your problem is that "mybuffer" is an unused local variable - the
compiler can therefore eliminate it entirely when optimising.
If you write code that uses mybuffer in some way (that can't be
optimised away), then it should work fine.
mvh.,
David
On 26/06/14 09:48, Kees Schoenmakers wrote
Hello,
You have a bug in your code, you are taking the address of the pointer
and zeroing it. This is a dangerous thing to do, the proper way is to do:
memset(mybuffer, 0, 10);
or
memset(&mybuffer[0], 0, 10);
The compiler should have given you a warning about that without the
cast.