Article View: comp.sys.amiga.tech
Article #13541Re: resource tracking
From: Joe Smith
Date: Wed, 07 Feb 1990 07:52
Date: Wed, 07 Feb 1990 07:52
31 lines
2380 bytes
2380 bytes
In article <355.25C92297@weyr.FIDONET.ORG> Jeff.Petkau@weyr.FIDONET.ORG (Jeff Petkau) writes:
>Warning: If you do not enjoy watching the physical abuse of dead horses, stop reading this message.
>It _is_ trivial. For memory, simply keep a pointer in the task
>structure to the same sort of list that C compilers use for malloc(),
It is NOT trivial. If we were to take your suggestion and automatically
free ALL memory a task allocates but does not free, then a lot of current
programs would would get random guru's after they exit.
There are a lot of programs that allocate memory and deliberately do not
free the memory because they give that chunk of memory to another task.
(One example would be a do-it-yourself CD program - the memory used to
hold the lock belongs to the system, not the task, after calling the
CurrentDir function.) Unfortunately, the current OS is missing calls
to the Exec to say "please pass the ownership if this resource to that task".
Unix does not have this problem since there are no other tasks sharing your
virtual address space. All memory gotten via malloc() can be freed with no
problem. But AmigaDos has several tasks sharing a single address space.
The Amiga has problems not shared with other Operating Systems.
Resource tracking can be done. But making it transparent to the programmer
and work with existing software is an almost impossible task. I'd like to
see it done right. But I'm afraid that it may take an incompatible release
of the OS - one where the current programs do not run.
--
Joe Smith (408)922-6220 | SMTP: jms@tardis.tymnet.com or jms@gemini.tymnet.com
BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms
PO Box 49019, MS-C41 | PDP-10 support: My car's license plate is "POPJ P,"
San Jose, CA 95161-9019 | humorous dislaimer: "My Amiga speaks for me."
Technical Details
Message-ID:
<926@tardis.Tymnet.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!jarthur!bridge2!3comvax!tymix!tardis!jmsReferences:
<355.25C92297@weyr.FIDONET.ORG>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!jarthur!bridge2!3comvax!tymix!tardis!jms From: jms@tardis.Tymnet.COM (Joe Smith) Newsgroups: comp.sys.amiga.tech Subject: Re: resource tracking Summary: Can't be done easily without breaking existing programs Keywords: giving allocated memory to another task Message-ID: <926@tardis.Tymnet.COM> Date: 7 Feb 90 07:52:37 GMT References: <355.25C92297@weyr.FIDONET.ORG> Reply-To: jms@tardis.Tymnet.COM (Joe Smith) Organization: BT Tymnet, San Jose, CA Lines: 31