home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cbmvax!andy
- From: andy@cbmvax.commodore.com (Andy Finkel)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Program Fragmenting Memory
- Message-ID: <34287@cbmvax.commodore.com>
- Date: 15 Aug 92 13:07:08 GMT
- References: <1992Aug9.023203.7467@ariel.ec.usf.edu> <rwm.713818561@atronx.OCUnix.On.Ca>
- Reply-To: andy@cbmvax.commodore.com (Andy Finkel)
- Organization: Flying Cat, Inc.
- Lines: 43
-
- In article <rwm.713818561@atronx.OCUnix.On.Ca> rwm@atronx.OCUnix.On.Ca (Russell McOrmond) writes:
- >stelmack@eggo.tmc.edu (Gregory M. Stelmack) writes:
- >>I've been trying to track this problem down for two days now, so I ask here in
- >>case it has to do with something outside my code.
- >
- > Do you by any chance use Amigados Local environment variables? I've myself
- >been trying to track down a fragmentation problem in my own software, and I
- >can't find any of my own memory allocations that are causing the problem.
- >
- > I haven't really spent a lot of time on it yet, so I'm not sure, but I'm
- >getting a little curious about whether or not local environment variables
- >are Free()'d when the process ends (IE: there is memory left over after I
- >exit the program).
-
- Assuming you are running in the Shell process itself (ie you are not
- run, and don't detach) any local variables your program creates
- will still be there when your program exits. The local variables
- are attached to the process structure. When the process exits, then
- the local variables are all freed. So if your program is RUN, you have
- your own process; any local variables are freed on exit. If you are
- running directly from the Shell, the local variables are attached to the
- Shell process structure, and will hang around until EndShell time.
-
- The RC and RESULT2 shell variables are special. When the Shell is started
- up, it creates blank variables; it updates those return codes by writing
- directly into the variable's buffer, rather than dumping the old one and
- setting a new one. It does this to avoid fragmentation.
-
- >
- >>-- Greg Stelmack (stelmack@eggo.csee.usf.edu)
-
- > Russell McOrmond rwm@Atronx.OCUnix.On.Ca Net Support:(613) 230-2282(V.32Bis)
-
-
- andy
- --
- andy finkel {uunet|rutgers|amiga}!cbmvax!andy
-
- "C++ should really have been called D."
-
-
- Any expressed opinions are mine; but feel free to share.
- I disclaim all responsibilities, all shapes, all sizes, all colors.
-