b****g 发帖数: 4933 | 1 Hi,
I am trying to write a program on mac. The program works on
PC, however, when I run it on Mac, some weird things happen.
The values of some variables keep changing. I suspect there
are at least two things related: memory allocation and
double precision. But I monitored all the memory allocation,
there are no error reported. For some double precision
variables, the values does change, but not all the
variables. I didn't use any mac toolbox or any specific
functions, and all the codes are in | f****n 发帖数: 355 | 2 maybe some of your variables are not initialized properly. you
know, for auto variables, they are generated dynamically. maybe
your PC compiler gives these variable a default value(probably 0)
while your Mac compiler does not.
【在 b****g 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Hi, : I am trying to write a program on mac. The program works on : PC, however, when I run it on Mac, some weird things happen. : The values of some variables keep changing. I suspect there : are at least two things related: memory allocation and : double precision. But I monitored all the memory allocation, : there are no error reported. For some double precision : variables, the values does change, but not all the : variables. I didn't use any mac toolbox or any specific : functions, and all the codes are in
|
|