Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!star.cs.vu.nl!rfschaa From: rfschaa@cs.vu.nl (Schaaf R F ) Newsgroups: comp.sys.atari.st.tech Subject: Re: Memory deallocation after TSR Message-ID: <8529@star.cs.vu.nl> Date: 18 Dec 90 10:29:49 GMT References: <8381@star.cs.vu.nl> <5208@brahma.cs.hw.ac.uk> <2767@atari.UUCP> Sender: news@cs.vu.nl Distribution: comp Organization: Fac. Wiskunde & Informatica, VU, Amsterdam Lines: 39 In article <2767@atari.UUCP> apratt@atari.UUCP (Allan Pratt) writes: >neil@cs.hw.ac.uk (Neil Forsyth) writes: >>In article <8381@star.cs.vu.nl> rfschaa@cs.vu.nl (Schaaf R F ) writes: >>>... quits by using the gemdos(49) call (TSR). >>>... I would like to free the memory used up by the driver ... > >>I have had a go at doing this too. I don't think it's possible without >>tinkering with the OS pool entries. That of course would be a highly >>undocumented thing to do and would result in Allan Pratt slapping your >>wrists heavily. >> [...] >>Come on Allan, help us out on this one. > >You lose. You can't Terminate and Stay Resident, then not Stay Resident. >There is no help to give: you asked to stay resident, and you got it. >You'll have to look at some other approach. > >============================================ >Opinions expressed above do not necessarily -- Allan Pratt, Atari Corp. >reflect those of Atari Corp. or anyone else. ...ames!atari!apratt How about the following (is this legal?) 1. Use Pexec to just load the program in memory and save the pointer, say 'basepage_pointer', to the basepage 2. Execute the program, again using Pexec. The program then exits using Ptermres. 3. When finished perform 'Mfree(basepage_pointer)' This seems to work, but the memory gets fragmented and I still seem to lose some memory. Therefore: 1. Is this legal? 2. can I recompact the memory so it becomes contiguous? ------------------------------------------------------------------- Richard Schaaf (rfschaa@cs.vu.nl) P.S. I will not be at the university for at least 4 weeks, so please send any reply via email otherwise the article will probably not be available when I return..... THANKS