🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #5001

Re: Memory Protection!

#5001
From: Charles Brown
Date: Thu, 23 Aug 1990 22:40
46 lines
2949 bytes
First I want to thank those people who pointed out that the current
Amiga compilers perform the memory tracking as long as I use malloc().
I hadn't known that.

>> In Unix it is slower because the system can release all that memory
>> much faster than you can.  Thats because it releases all of it at once
>> rather than releasing each separately malloc'ed portion.
>>          :
>> The only reason I was concerned about this is because on the Amiga you
>> *must* deallocate all that RAM because the system does not implement
>> resource tracking.  I mentioned to him that I intended to do this in
>> all my code.  He told me it was a bad idea for code which would be
>> used on Unix.

> This is a ridiculous statement. It is never a bad idea for a program to
> track its own memory usage. I little extra work, perhaps. Given the speed
> of modern day Unix systems, a few extra milliseconds overhead to explicitly
> free memory when the program exits is not going to be significant, or even
> noticable.

Be careful what you call rediculous.  You are telling me that I should
put in extra code making the program take longer to write, take more
space on disk and in RAM, take longer to run, and for what?  You have
mentioned no advantages.  The only argument you offer in favor of your
approach ("It is never a bad idea"..) seems to be strictly religious.

> The other side of this is that a program that is written efficiently for
> the Amiga is generally never going to run on a Unix machine. There is a 
> very restricted class of software (strictly file I/O, command-line based,
> no user interaction) that, when done right, looks the same on both 
> machines. And even then, it's usually possible to take advantage of 
> Amiga-specific features to make it smaller and faster.
> -- 
> John Meissen .............. Oregon Advanced Computing Institute

Perhaps I'm old fashioned.  I still find programs like sed, awk and
perl useful.  In fact the program which I was talking about when I
first jumped into this notes string was a filter with no user
interaction.  It is designed strictly for doing math on an input file,
in the same sense that sed does string substitutions on an input file.
Sometimes I want the computer to perform a task *without* interaction.
--
	Charles Brown	charles@cv.hp.com or charles%hpcvca@hplabs.hp.com
			or hplabs!hpcvca!charles or "Hey you!"
	Not representing my employer.
	"The guy sure looks like plant food to me." Little Shop of Horror
Technical Details
Message-ID: <1410051@hpcvca.CV.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-pcd!hpcvca!charles
References: <1145.26bd4989@waikato.ac.nz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-pcd!hpcvca!charles
From: charles@hpcvca.CV.HP.COM (Charles Brown)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Memory Protection!
Message-ID: <1410051@hpcvca.CV.HP.COM>
Date: 23 Aug 90 22:40:59 GMT
References: <1145.26bd4989@waikato.ac.nz>
Organization: Hewlett-Packard Co., Corvallis, Oregon
Lines: 46