From: Ludovic Brenta <ludovic.brenta@insalien.org>
Subject: Re: GNAT and Memory Maps?
Date: 05 Jul 2003 15:10:36 +0200
Date: 2003-07-05T15:10:36+02:00 [thread overview]
Message-ID: <m3n0ftp19v.fsf@insalien.org> (raw)
In-Reply-To: pan.2003.07.05.03.42.01.638542.1720@nomail.com
Freejack <Freejack@nomail.com> writes:
> 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.)
>
> I'm using Linux at the moment, and I could just as easily use the native C
> library (glibc). However, I want to handle this entirely in Ada. I'm using
> the No_Run_Time Pragma.
>
> Note: I'm also a Forther, so the idea of explicit memory and device
> handling doesnt frighten me. ;->
>
> (Hmmm...now theres an experiment to try sometime. A Subroutine Threaded
> Forth VM in Ada.)
My first idea is to use your own storage pool; see ARM 13.11 for
information on storage pools. However, I'm not sure this approach
works with pagma No_Run_Time.
By the way, I came across a post by Robert Dewar where he said
No_Run_Time is obsolete. Here is the URL:
http://gcc.gnu.org/ml/gcc/2002-11/msg00321.html
What is your situation? Are you writing a Linux kernel module in Ada?
(that's the only reason I can think of to use No_Run_Time) In this
case, I'm not sure you can use glibc either.
--
Ludovic Brenta.
next prev parent reply other threads:[~2003-07-05 13:10 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 [this message]
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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox