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: <1991Apr2.111427.27780@informatik.uni-erlangen.de>
Organization: CSD., University of Erlangen, Germany
References: <ENTROPY.91Mar31015905@wookumz.gnu.ai.mit.edu>
Distribution: comp
Date: Tue, 2 Apr 1991 11:14:27 GMT
Lines: 20

entropy@gnu.ai.mit.edu (entropy) writes:

>If I want a program to malloc() some memory (which I want to stay
>around after exiting) can I then do a Ptermres(0, 0) or do I still have
>to save the whole program in memory in order to keep that malloc'ed
>memory around?  Or should I do Ptermres(256, 0) to keep only the

When you exit a program via Ptermres() everything you have malloc'ed
stays resident even if you say Ptermres(0,0). If you want to keep
your code resident, too, you'll have to reserve it via Ptermres().
It is legal to keep the start of your program resident and throw
the rest away.
 

----------------------------------------------------------------------
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
----------------------------------------------------------------------
