From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,195cfda04e416f67 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-07 01:05:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!news-FFM2.ecrc.net!oleane.net!oleane!nnrp.oleane.net!skymaster!nobody From: "Jean-Pierre Rosen" Newsgroups: comp.lang.ada Subject: Re: GNAT and Memory Maps? Date: Mon, 7 Jul 2003 09:44:55 +0200 Organization: Adalog Message-ID: <3e8beb.pej.ln@skymaster> References: NNTP-Posting-Host: mailhost.axlog.fr X-Trace: s1.read.news.oleane.net 1057564866 6506 195.25.228.57 (7 Jul 2003 08:01:06 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Mon, 7 Jul 2003 08:01:06 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:40097 Date: 2003-07-07T09:44:55+02:00 List-Id: "Freejack" 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