comp.lang.ada
 help / color / mirror / Atom feed
From: jef.mangelschots@gmail.com
Subject: Re: copying data between memory locations
Date: Tue, 04 Sep 2007 18:16:54 -0000
Date: 2007-09-04T18:16:54+00:00	[thread overview]
Message-ID: <1188929814.160464.273080@g4g2000hsf.googlegroups.com> (raw)
In-Reply-To: <1188921451.460758.74670@r34g2000hsd.googlegroups.com>

Just a few words of clarification:

I do work on and off on both Ada and C projects, so yes, I sometimes
do tend to think in terms like "I would do that like this in C, how do
I do it in Ada".
It is an Ada83 project with a very short deadline. This section of
code is non-vital. Hopefully our last new Ada83 project (Ada83 is
dictated by the compiler we use. not because we want it). Next
projects will be Ada95/2005 on a new platform with new compilers.
The reason why I ask the question is because we typically never do
this kind of stuff and do it in ways suggested in your replies, hence
my question. Thanks for the answers though.
We feel comfortable doing this because we know the size of that buffer
exactly and typically build in at least 2 ways of guaranteeing no
buffer overflow can occur.
The reason we want to do this is because it will bloat the code
significantly if we want to go through the regular channels to get the
data in those buffers. It is easy for use to know their memory address
and size because they are mapped to specific hardware locations.
Some of your suggestions like "type byte_array is array( <> ) of
byte;",we do use already.
The fact that Ada95 has a feature that could help us out means that it
isn't an unreasonable request. Unfortunately, Ada83 doesn't have it.
The difficulty is in maintaining a reference to these buffers, which
are located and maintained elsewhere, in an array of structures, and
access them via these references in a generic way rather than directly
via their implementation-specific interfaces.

Thank you for the answers.
regards
Jef




  reply	other threads:[~2007-09-04 18:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-03  8:59 copying data between memory locations jef.mangelschots
2007-09-03 10:38 ` Martin Krischik
2007-09-04 15:57   ` Adam Beneschan
2007-09-04 18:16     ` jef.mangelschots [this message]
2007-09-04 20:12       ` Jeffrey R. Carter
2007-09-03 11:09 ` Niklas Holsti
2007-09-03 16:26 ` Steve
2007-09-03 17:22 ` Jeffrey R. Carter
2007-09-04 11:31 ` Stephen Leake
2007-09-05  4:39 ` anon
replies disabled

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