comp.lang.ada
 help / color / mirror / Atom feed
From: kassover@minerva.crd.ge.com (David Kassover)
Subject: Re: C Strings in Ada?
Date: 11 Jun 90 14:59:25 GMT	[thread overview]
Message-ID: <8446@crdgw1.crd.ge.com> (raw)
In-Reply-To: 57245@bbn.BBN.COM

In article <57245@bbn.BBN.COM> adoyle@vax.bbn.com (Allan Doyle) writes:
...
>
>Judging from the replies about heap space, I'm getting a little worried.
>Do you guys mean to tell me that it's compiler dependent how to allocate
>the 'c_string' constant? This is just the sort of thing that makes me
>mistrust Ada for a realtime application that has to run for a long time
>without any memory leaks. If I take the worst case assumption that c_string
>is being allocated from the heap and add it to the worst case assumption
>that my Ada run-time will not be doing garbage collection (perfectly legal,
>I understand), then how many of these little beasties can I convert from
>Ada to C before I run out of memory?

Perhaps I'm naive.  But isn't management of things like heaps and
stacks and stuff the purview of the underlying hardware and
operating system (if any?)

Under VMS, regardless of language used (well, take my absolutes
as approximately equal to .9944  8-), heap, stack, vm, etc
management can be affected by several parameters pertaining to
the operating system, the user account structure, and the current
hardware configuration.

On the other hand, if you *have* no operating system (your
program lives in an automated teller machine, e.g.) then when you
run out of memory depends on how much you have and how busy your
program was.  If this is a problem, then you must write a garbage
collector yourself (and find room for it in memory  8-), or get
the powers that be to plug in a bigger memory board, or poll the
ATM more frequently.

And furthermore, if what you are writing *is* an operating system
(in the sense of, say, OS 360, MS-DOS, VAX-VMS, VM/CMS, Primos,
or bhog-knows-what), then you *also* might consider writing a
garbage collector, and publishing instructions to writers of
compilers on how to take advantage of it.

But that has nothing, IMHO, to do with Ada.

Or have I missed a point here?
--
David Kassover             "Proper technique helps protect you against
kassover@ra.crd.ge.com	    sharp weapons and dull judges."
kassover@crd.ge.com			F. Collins

  reply	other threads:[~1990-06-11 14:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-06-04 22:45 C Strings in Ada? Andy DeFaria
1990-06-07 17:41 ` stt
1990-06-08 16:00 ` Andy DeFaria
1990-06-10 20:38   ` Alex Blakemore
1990-06-11 12:57     ` Allan Doyle
1990-06-11 14:59       ` David Kassover [this message]
1990-06-11 19:48         ` Allan Doyle
1990-06-11 21:01           ` David Kassover
1990-06-11 22:30           ` Mike Murphy
1990-06-13 21:20           ` Edward Falis
1990-06-11 17:53       ` David Emery
1990-06-11 19:59         ` Allan Doyle
1990-06-15  7:53   ` Jeff Bartlett
1990-06-11 22:39 ` Andy DeFaria
1990-06-12 14:04   ` David Emery
1990-06-12 18:11   ` Mike Murphy
1990-06-13 13:43 ` stt
replies disabled

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