comp.lang.ada
 help / color / mirror / Atom feed
From: Wes Groleau <wwgrol@ftw.rsc.raytheon.com>
Subject: Re: package body functionality
Date: Thu, 31 May 2001 14:08:11 -0500
Date: 2001-05-31T14:08:11-05:00	[thread overview]
Message-ID: <3B16969B.1C8AFD20@ftw.rsc.raytheon.com> (raw)
In-Reply-To: hR6R6.5195$rn5.257552@www.newsranger.com


> >Possible exception: If the package is a shared library or in a distributed
> >environment. I'm not sure what the language rules are, but I'd suspect that
> >a DLL would not re-elaborate every time another program started up and
> >called for its services. Maybe under some conditions (separate data spaces)
> 
> My understanding is that DLL's keep a count of how many programs are using them,
> and get automagicly unloaded when the count goes down to 0. You'd want it to
> elaborate once for the first call that loads it in, then not again until the
> next call after it unloads.

There are many things a package in a DLL or shared lib might do during
elaboration that would require re-elaboration for each client.  Just for a
few:

  Create a log file.
  Initialize a random number generator.
  Read the process ID.
  Note the time we started running.

Doesn't seem practical for a compiler/linker to foresee ALL the possibilities
and optionally skip elaboration.

-- 
Wes Groleau
http://freepages.rootsweb.com/~wgroleau



  parent reply	other threads:[~2001-05-31 19:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-26 14:28 package body functionality Staffan Dittmer
2001-05-26 17:09 ` Larry Kilgallen
2001-05-26 17:22 ` Jeffrey Carter
2001-05-26 18:31   ` DuckE
2001-05-26 19:16 ` Aron Felix Gurski
2001-05-27 13:50 ` Ken Garlington
2001-05-29  9:15   ` Philip Anderson
2001-05-29 13:26 ` Ted Dennison
2001-05-29 19:11 ` Stephen Leake
2001-05-29 20:34   ` Ted Dennison
2001-05-29 21:29     ` Marin David Condic
2001-05-30 13:46       ` Ted Dennison
2001-05-30 14:25         ` Marin David Condic
2001-05-31 19:08         ` Wes Groleau [this message]
2001-05-30 14:23     ` Stephen Leake
2001-05-31  1:37   ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox