Newsgroups: comp.sys.atari.st.tech Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!fauern!faui43.informatik.uni-erlangen.de!csbrod From: csbrod@immd4.informatik.uni-erlangen.de (Claus Brod) Subject: Re: Ptermres() Message-ID: <1991Apr12.170619.23554@informatik.uni-erlangen.de> Organization: CSD., University of Erlangen, Germany References: <1991Apr2.111427.27780@informatik.uni-erlangen.de> <1991Apr8.130807.3046@informatik.uni-erlangen.de> <2902@atari.UUCP> Distribution: comp Date: Fri, 12 Apr 1991 17:06:19 GMT Lines: 27 apratt@atari.UUCP (Allan Pratt) writes: >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. This is what I expected. The discussion, however, was on the question where malloc'ed blocks go to when you do a Ptermres(0, 0). To my knowledge, the malloc'ed blocks vanish from both internal memory lists and so stay resident. I don't see how code packed into those blocks can crash if it doesn't rely on still being a process of its own. Having borrowed your ear 8-), I add a new question: How can one test reliably if some GEMDOS drive is a BIOS controlled device or a MetaDOS device? ---------------------------------------------------------------------- Claus Brod, Am Felsenkeller 2, Things. Take. Time. D-8772 Marktheidenfeld, West Germany (Piet Hein) csbrod@medusa.informatik.uni-erlangen.de Claus Brod@wue.maus.de ----------------------------------------------------------------------