Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - Reseting the state of all global variables in a program
I want to re-initialise all global variables defined in a program. Is there any method for doing this ?? Reasons are, I have some third party routines which I have adapted to be called from my program. However, when I call these routines for a second time, the results are incorrect because the global variables are not initialised. I don't want to tamper with the routines too much. There's lots of global variables... Any ideas ??? Apr 16 2003
"jim p" <x y.com> wrote in message news:b7k7ts$1sua$1 digitaldaemon.com...I want to re-initialise all global variables defined in a program. Is there any method for doing this ?? Reasons are, I have some third party routines which I have adapted to be called from my program. However, when I call these routines for a second time, the results are incorrect because the global variables are not initialised. I don't want to tamper with the routines too much. There's lots of global variables... Any ideas ??? Apr 16 2003
Cheers Walter. Excuse my ignorance, but how do I save/restore the contents and what is the BSS segment ?? "Walter" <walter digitalmars.com> wrote in message news:b7kah0$29b0$1 digitaldaemon.com..."jim p" <x y.com> wrote in message news:b7k7ts$1sua$1 digitaldaemon.com...I want to re-initialise all global variables defined in a program. Is there any method for doing this ?? Reasons are, I have some third party routines which I have adapted to be called from my program. However, when I call these routines for a second time, the results are incorrect because the global variables are not initialised. I don't want to tamper with the routines too much. There's lots of global variables... Any ideas ??? Apr 16 2003
"jim p" <x y.com> wrote in message news:b7kb4j$2a77$1 digitaldaemon.com...Cheers Walter. Excuse my ignorance, but how do I save/restore the contents Apr 16 2003
ok, its all in place. I'm still not sure about the BSS segment. I see it in the map file, but I'm not sure what to look for, with regards to it being OK James "Walter" <walter digitalmars.com> wrote in message news:b7kf9c$2df6$1 digitaldaemon.com..."jim p" <x y.com> wrote in message news:b7kb4j$2a77$1 digitaldaemon.com...Cheers Walter. Excuse my ignorance, but how do I save/restore the contents Apr 16 2003
Data in the BSS segment does not occupy space in the exe file, it's just allocated by the loader and set to 0. "jim p" <x y.com> wrote in message news:b7kos7$2khr$1 digitaldaemon.com...ok, its all in place. I'm still not sure about the BSS segment. I see it in the map file, but I'm not sure what to look for, with regards Apr 17 2003
ok, but how do I check its 'right' ? "Walter" <walter digitalmars.com> wrote in message news:b7llhm$5v3$1 digitaldaemon.com...Data in the BSS segment does not occupy space in the exe file, it's just allocated by the loader and set to 0. "jim p" <x y.com> wrote in message news:b7kos7$2khr$1 digitaldaemon.com...ok, its all in place. I'm still not sure about the BSS segment. I see it in the map file, but I'm not sure what to look for, with Apr 17 2003
Check that you are saving and restoring the data in it. "jim p" <x y.com> wrote in message news:b7lret$9ts$1 digitaldaemon.com...ok, but how do I check its 'right' ? "Walter" <walter digitalmars.com> wrote in message news:b7llhm$5v3$1 digitaldaemon.com...Data in the BSS segment does not occupy space in the exe file, it's just allocated by the loader and set to 0. "jim p" <x y.com> wrote in message Apr 17 2003
|