🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #465

Re: releasing the environment in tsrs

#465
From: walt dixon
Date: Thu, 10 May 1990 01:34
24 lines
1514 bytes
In a previous article Bob Hodge writes:

>>I recently added a routine to a tsr to release the environment
>>memory block before terminating.

>It was my understanding that DOS won't allocate that memory to
>later tasks, anyway, so why bother?  Have you demonstrated
>conclusively some real use for that block?  (Other than special
>use you might put it to in custom apps.)

DOS uses one of three algorithms: first fit, last fit, or best fit
to satisfy memory allocation requests.  The default is first fit.
If a returned environment block is big enough to satisfy the request,
DOS will use it.  Applications tend not to use int 21h ah=48h for
memory allocation.  The most common case would be to recycle the
returned block to hold another copy of the environment,  but its
available for any other purpose as well.

Walt Dixon	{internet:	dixon@crd.ge.com	}
		{us mail:	ge-crd			}
		{		po box 8		}
		{		schenectady, ny 12301	}
		{phone:		518-387-5798		}
Walt Dixon dixon@crd.ge.com
Technical Details
Message-ID: <7516@crdgw1.crd.ge.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!crdgw1!sagittarius!dixon
References: <489@wjh12.harvard.edu> <1191@abvax.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!crdgw1!sagittarius!dixon
From: dixon@sagittarius.crd.ge.com (walt dixon)
Newsgroups: comp.sys.ibm.pc.programmer
Subject: Re: releasing the environment in tsrs
Message-ID: <7516@crdgw1.crd.ge.com>
Date: 10 May 90 01:34:13 GMT
References: <489@wjh12.harvard.edu> <1191@abvax.UUCP>
Sender: news@crdgw1.crd.ge.com
Reply-To: dixon@sagittarius.crd.ge.com (walt dixon)
Organization: General Electric Corp. R&D, Schenectady, NY
Lines: 24