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!postnews.google.com!f14g2000cwb.googlegroups.com!not-for-mail From: "Adrian Hoe" Newsgroups: comp.lang.ada Subject: Re: POSIX.Memory_Mapping.Map_Memory Date: 26 Feb 2005 22:59:30 -0800 Organization: http://groups.google.com Message-ID: <1109487570.008408.193130@f14g2000cwb.googlegroups.com> 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> <87u0oykawh.fsf@deneb.enyo.de> NNTP-Posting-Host: 219.95.190.47 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1109487574 7852 127.0.0.1 (27 Feb 2005 06:59:34 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 27 Feb 2005 06:59:34 +0000 (UTC) In-Reply-To: <87u0oykawh.fsf@deneb.enyo.de> User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: f14g2000cwb.googlegroups.com; posting-host=219.95.190.47; posting-account=LKUaWwwAAABzCo8SD2jIIt5LtkPzH8ot Xref: g2news1.google.com comp.lang.ada:8505 Date: 2005-02-26T22:59:30-08:00 List-Id: Florian Weimer wrote: > * 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. Just for the purpose of recording for people who may need this in the future: I've successfully mapped the memory with POSIX.Memory_Mapping.Map_Memory. The VIDIOCGMBUF ioctl has to be issued before Map_Memory. This ioctl reports the size of buffer to Memory_Map and the offset within the buffer for each frame. My application is far from completion but I have resolved this Memory_Map issue. I believe the wheel has just started rolling again. :-) Regards, -- Adrian Hoe