comp.lang.ada
 help / color / mirror / Atom feed
From: "Jean-Pierre Rosen" <rosen@adalog.fr>
Subject: Re: GNAT and Memory Maps?
Date: Mon, 7 Jul 2003 09:44:55 +0200
Date: 2003-07-07T09:44:55+02:00	[thread overview]
Message-ID: <3e8beb.pej.ln@skymaster> (raw)
In-Reply-To: pan.2003.07.05.03.42.01.638542.1720@nomail.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1151 bytes --]


"Freejack" <Freejack@nomail.com> a �crit dans le message news:
pan.2003.07.05.03.42.01.638542.1720@nomail.com...
> I've been picking through the GNAT docs (and Ada docs in general) in an
> attempt to figure out how/if and when/why the Ada compiler might choose to
> use an mmap system call in deference to a malloc/calloc or alloca call.
>
> Basically, I'm doing some low level routines and I need explicit control
> over what pages are swapped and when. ( mmap() mlock() munlock() and
> munmap() are the usual C functions for handling this.)
>
A common advice for this kind of issues is:
   Don't cheat.

If your need is to call mmap() (or whatever), just call it. Don't try to
second guess
some Ada statements that happen to do what you need today (but maybe not
tomorrow).

Ada statements are there to protect you from the underlying implementation.
If your need is to use a particular implementation (which I don't criticize,
there may be
plenty of good reasons for it), just do it openly.

--
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr





      parent reply	other threads:[~2003-07-07  7:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-05  3:36 GNAT and Memory Maps? Freejack
2003-07-05  4:42 ` Freejack
2003-07-05 13:10 ` Ludovic Brenta
2003-07-05 23:24   ` Freejack
2003-07-08  1:40   ` John Kern
2003-07-08  8:20     ` Freejack
2003-07-08 14:56     ` Rod Chapman
2003-07-05 16:22 ` Simon Wright
2003-07-07  3:50   ` Hyman Rosen
2003-07-08 20:20     ` Simon Wright
2003-07-05 19:59 ` Florian Weimer
2003-07-07  7:44 ` Jean-Pierre Rosen [this message]
replies disabled

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