Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!cernvax!chx400!ugun2b!ugsc2a!fisher From: fisher@sc2a.unige.ch Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Is there any easy way to remove Resident programs form Memory? Message-ID: <1991May31.153030.452@sc2a.unige.ch> Date: 31 May 91 13:30:30 GMT References: <348@daily-planet.concordia.ca> <1991May29.073225.18179@ugle.unit.no> <1991May29.195754.25342@...!asuvax!gtephx> Organization: University of Geneva, Switzerland Lines: 43 In article <1991May29.195754.25342@...!asuvax!gtephx>, fraserr@...!asuvax!gtephx (Ross Fraser) writes: > In article <1991May29.073225.18179@ugle.unit.no>, hallvard@immhp3.marina.unit.no (Hallvard Paulsen) writes: >> There are some utility programs called "mark" which puts a "bookmark" >> in your memory and "release" that frees all memory up to the last >> "bookmark". > > My experience is that RELEASE will not work if MARK has been invoked in > a batch file (such as AUTOEXEC.BAT) until the batch file has terminated. > How do I kill the batch file, is there another utility that does not have > this restriction, or am I doing something wrong? The behavior of RELEASE is to `remember' the command and to execute it as soon as the batch file is terminated. This is because COMMAND needs a little space to store the current file offset and the current state of a `for' loop for example. Very strange things might happen if you release that piece of memory... Two important things to know: - The memory used for the batch file can be released *before* the last command. This is easily accomplished by ending the file immediately after that last command (i.e., don't add a new line sequence or insert a Ctrl-Z on the same line. Thus, if the last line is "RELEASE mark ", COMMAND will know that the batch file ends and will release the memory before RELEASE is executed. In fact, I'm not sure how it works, but RELEASE doesn't complain this way. BTW: the same thing holds if the batch file kills itself on the last line (i.e. "del BATCH.BAT "), to avoid the "batch file missing" message. - To be able to add commands after the RELEASE, there is the /s switch (at least since version 2.9 of the package), wich can be used to stuff up to 15 chars in the keyboard buffer. A tiny and convenient `keyfake', so to speak. For the details, please refer to the `tsr.doc' file. In effect, this means that you can chain batch files through RELEASE, or execute a program in the freshly released memory. I hope this answers your question, Markus G. Fischer, Dept of Anthropology, Geneva CH fisher@sc2a.unige.ch PS: the files are available at many anonymous ftp archive sites such as wsmr-Simtel20.army.mil (192.88.110.20), wuarchive.wustl.edu (128.252.135.4) or garbo.uwasa.fi (128.214.12.37), usually in a directory like msdos/sysutl, and under the name tsr.zip and tsrsrc.zip.