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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7e32386ac8078f13 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!newsfeed.stueberl.de!feed.news.tiscali.de!news.belwue.de!LF.net!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: POSIX.Memory_Mapping.Map_Memory Date: Sun, 30 Jan 2005 19:51:58 +0100 Message-ID: <87u0oykawh.fsf@deneb.enyo.de> References: <1107014307.952357.216870@f14g2000cwb.googlegroups.com> <1107016260.265640.138990@z14g2000cwz.googlegroups.com> <1107053159.644479.173850@z14g2000cwz.googlegroups.com> <1107100953.572623.128530@f14g2000cwb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: albireo.enyo.de 1107111119 14709 212.9.189.177 (30 Jan 2005 18:51:59 GMT) X-Complaints-To: Cancel-Lock: sha1:oyOV3Un6yD+aIhIhSBHo7cHyMNg= Xref: g2news1.google.com comp.lang.ada:8084 Date: 2005-01-30T19:51:58+01:00 List-Id: * Mark Lorenzen: >> I was just wondering: Is it allowed to map a device file as shared >> memory? Try to use MAP_PRIVATE instead of MAP_SHARED. > > Furthermore: I do not think that it is possible to map character > special files, since it only allows sequential access. You can > probably only map block special files. It's possible to map /dev/zero. In fact, there is little difference between character and block devices these days.