comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <mcondic.auntie.spam@acm.org>
Subject: Re: Array and memory usage
Date: Sun, 9 Mar 2003 08:34:40 -0500
Date: 2003-03-09T13:34:47+00:00	[thread overview]
Message-ID: <b4fftn$o3b$1@slb2.atl.mindspring.net> (raw)
In-Reply-To: slrnb6mbnv.8a1.randhol+news@kiuk0152.chembio.ntnu.no

Note that it is *probably* generating code that will initialize the objects
as they are created. It is probably also not the most efficient way that the
initialization could be done, either. I've seen major problems with embedded
code where we've wanted to initialize global RAM data and couldn't get
static initialization of it using the usual Ada mechanisms. I've also seen
where initialization of the type would generate code to initialize each
field of the record with function calls but initialization of the object
with an aggregate would result in a simple memory move of the whole thing.

If you care about code size and efficiency, you can find a number of
"surprises" and "gotchas" with Ada.

MDC
--
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/

Send Replies To: m c o n d i c @ a c m . o r g

    "Going cold turkey isn't as delicious as it sounds."
        -- H. Simpson
======================================================================

Preben Randhol <randhol+news@pvv.org> wrote in message
news:slrnb6mbnv.8a1.randhol+news@kiuk0152.chembio.ntnu.no...
>
> Ok but I also have a :
>
>    User_Db : User_Data;
>
> And if I use the first User_Data type then the memory usage only increases
as
> I add Names and Hostnames. I mean it doesn't go from 800 to 2356 as I
> add one name, but slowly until all Names are added. This puzzeles me.






  reply	other threads:[~2003-03-09 13:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-09 11:19 Array and memory usage Preben Randhol
2003-03-09 11:52 ` John R. Strohm
2003-03-09 12:11   ` Preben Randhol
2003-03-09 13:34     ` Marin David Condic [this message]
2003-03-09 15:05       ` Preben Randhol
2003-03-10  1:45       ` Mark Biggar
2003-03-10 11:57         ` Marin David Condic
2003-03-10 12:06           ` Jeffrey Creem
2003-03-09 17:49     ` Robert A Duff
2003-03-09 17:04 ` Jeffrey Creem
2003-03-09 17:09   ` Preben Randhol
2003-03-09 18:10 ` Robert A Duff
2003-03-10 15:13   ` Matthew Heaney
2003-03-10 23:33     ` Robert A Duff
2003-03-11  0:40       ` Randy Brukardt
2003-03-11 23:37         ` Robert A Duff
2003-03-12 19:18           ` Randy Brukardt
2003-03-11 16:01       ` Matthew Heaney
2003-03-11 17:38       ` Warren W. Gay VE3WWG
  -- strict thread matches above, loose matches on Subject: below --
2003-03-12 22:04 Alexandre E. Kopilovitch
2003-03-12 22:20 ` Larry Kilgallen
replies disabled

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