TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Proportional Font
Show HTML Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mime-Version: 1.0
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
X-To: Stanley Allen <[log in to unmask]>
Date: Wed, 13 May 1998 14:40:18 -0400
Reply-To: "Robert I. Eachus" <[log in to unmask]>
From: "Robert I. Eachus" <[log in to unmask]>
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset="us-ascii"
Parts/Attachments: text/plain (22 lines)
At 12:13 AM 5/13/98 -0500, Stanley Allen wrote:
>The single global reference count is to keep
>track of "database interface" objects.  There is
>a single count because there is one database, in
>shared memory.  The shared memory is allocated
>via OS calls when the ref count > 0, deallocated
>when the ref count = 0.

   Not the Ada way. ;-)  Seriously, if you do need to keep track of the
users of some global object, the best way is to use some sort of a list.
This way you don't have to worry about the (hopefully very rare) cases
where an object gets Finalized twice, or Finalized without complete
Initialization.  There are list structures where removing an item from a
list is atomic, and adding to and deleting from the list, and checking for
zero length are all O(1) operations.

                                        Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...

ATOM RSS1 RSS2