Mail Archives: djgpp/2000/09/26/09:22:58
On Sun, 17 Sep 2000, Rafa=B3 Maj wrote:
> I think, that the best way to defragment all memory, and make all memory
> again available (in case of any memory leeks) is to... exit program & run=
it
> again :)
>=20
> But how to do it ?
You can't. DJGPP doesn't support this mode of program restart.
> If I'll realy to quit program, then main program will write some informat=
ion
> to disk file, to tell caller-program to quit.
To make this work in a real-life application, you will have to save=20
memory contents and file handles that existed in the program before you=20
exited, and then restore those when the program is restarted. There's no=
=20
library function which does that, so unless you do all this in your own=20
code (lots of it ;-), it won't work.
It's much easier to find all those memory leaks and correct them. And=20
you get a better program as a bonus ;-)
> >>>>>> Ther are so many spawn*** functions... Witch to call, how to call =
it,
> when main program name is "main.exe" and arguments are "1st" and "2nd" ?
As far as I could see, the Info page for the "spawn*" functions includes=20
an example.
- Raw text -