Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!fernwood!portal!atari!apratt From: apratt@atari.UUCP (Allan Pratt) Newsgroups: comp.sys.atari.st.tech Subject: Re: Ptermres() Message-ID: <2902@atari.UUCP> Date: 11 Apr 91 21:19:08 GMT References: <1991Apr2.111427.27780@informatik.uni-erlangen.de> <1991Apr8.130807.3046@informatik.uni-erlangen.de> Distribution: comp Organization: Atari Corp., Sunnyvale CA Lines: 25 >wolfram@tschil.informatik.rwth-aachen.de (Wolfram Roesler) writes: >... and then terminates via Ptermres(0,0) ... csbrod@immd4.informatik.uni-erlangen.de (Claus Brod) writes: >If I'm wrong here, Allan Pratt >will certainly correct me in an instant 8-) Did I hear my name being called? Ptermres(0,0) is unsafe. Your TPA is shrunk to zero size (or freed) before the terminate happens, and therefore you are relying on the contents of memory that nobody owns: the contents of your basepage to process the terminate. This is bad news. Don't do it. The minimum size argument to Ptermres should be $80 (the size of your basepage, up to the command line). This wierd case is not one the authors of GEMDOS (including me) anticipated, so it's not enforced or anything. I guess it could be. Of course, people frequently *do* rely on the contents of memory that nobody owns, but it's not SAFE. In particular, that address may have no meaning any more in a VM system. ============================================ Opinions expressed above do not necessarily -- Allan Pratt, Atari Corp. reflect those of Atari Corp. or anyone else. ...ames!atari!apratt