🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Saving (and finding it again) memory

#13025
From: Bob Page
Date: Wed, 07 Jun 1989 17:45
16 lines
1113 bytes
dwl10@uts.amdahl.com (Dave Lowrey) wrote:
>     1. Have a program allocate & initialize some memory
>     2. That program exits.
>     3. Have another program be able to find that memory.

Here's an ugly way to do it - have the program 'mark' the start
address someplace.  Either a known file name, an environment variable,
a known port name, etc.  Then have the second task deallocate the
memory and remove the 'marker' when it's done with it.  Make sure
both tasks agree on how much memory is allocated, or allow the
second one to find out.

Don't use malloc, the C compiler's runtime library will deallocate
the memory when you exit.

..bob
Technical Details
Message-ID: <108611@sun.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!sun-barr!sun!swap!page
References: <d4nD02AQ32cd01@amdahl.uts.amdahl.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!sun-barr!sun!swap!page
From: page%swap@Sun.COM (Bob Page)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Saving (and finding it again) memory
Message-ID: <108611@sun.Eng.Sun.COM>
Date: 7 Jun 89 17:45:54 GMT
References: <d4nD02AQ32cd01@amdahl.uts.amdahl.com>
Sender: news@sun.Eng.Sun.COM
Reply-To: page@sun.UUCP (Bob Page)
Organization: Sun Microsystems, Mountain View
Lines: 16