Article View: comp.sys.amiga.tech
Article #851Re: Minix, Unix on the Amiga, and flames on AmigaDOS braindamage...
From: George Robbins
Date: Fri, 11 Aug 1989 22:39
Date: Fri, 11 Aug 1989 22:39
27 lines
2031 bytes
2031 bytes
In article <1410023@hpcvca.CV.HP.COM> charles@hpcvca.CV.HP.COM (Charles Brown) writes:
> >> Rubbish. Every AmigaOS program has to have a substantial amount of code
> >> devoted to resource tracking... a job better assigned to the O/S. If you
> >> don't want to call that "coding around" the problems, then you're
> >> just playing games with words.
>
> I try to write my programs in standard C so that they are portable
> between Unix and Amiga. I told a friend of mine (who doesn't own an
> Amiga but who knows a great deal about Unix) that I planned to change
> my programming style to explicitely free all memory that I had
> malloced. He said that under Unix that was a bad idea because the OS
> can free the memory much faster than my explicit calls.
To some extent this may be true, especially if it's a simple case of malloc
whatever you use once and then run with it. If you malloc stuff on an
ongoing basis or have a program that runs for an arbitrary length of time,
then even in a "free on termination" environment, you should be tracking
and freeing memory. The alternative is known as "memory leaks".
In most cases, the amount of code/time to free allocated memory should
be quite trivial. If it bothers your efficiency experts, then #ifdef
the code...
--
George Robbins - now working for, uucp: {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing arpa: cbmvax!grr@uunet.uu.net
Commodore, Engineering Department fone: 215-431-9255 (only by moonlite)
Technical Details
Message-ID:
<7635@cbmvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!apple!oliveb!amiga!cbmvax!grrReferences:
<SHADOW.89Aug2040433@pawl.rpi.edu> <1410023@hpcvca.CV.HP.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!apple!oliveb!amiga!cbmvax!grr From: grr@cbmvax.UUCP (George Robbins) Newsgroups: comp.sys.amiga.tech Subject: Re: Minix, Unix on the Amiga, and flames on AmigaDOS braindamage... Message-ID: <7635@cbmvax.UUCP> Date: 11 Aug 89 22:39:48 GMT References: <SHADOW.89Aug2040433@pawl.rpi.edu> <1410023@hpcvca.CV.HP.COM> Reply-To: grr@cbmvax.UUCP (George Robbins) Organization: Commodore Technology, West Chester, PA Lines: 27