Article View: comp.os.os2.programmer
Article #3646Re: Does OS/2 support Memory Mapped Files ?
From: Wen-Chun Ni
Date: Tue, 26 Jan 1993 07:15
Date: Tue, 26 Jan 1993 07:15
31 lines
1840 bytes
1840 bytes
In article <1993Jan26.055912.20063@netcom.com> ljensen@netcom.com (Colin Jensen) writes:
>In article <727805912rommel.root@jonas.gold.sub.org> rommel@jonas.gold.sub.org (Kai Uwe Rommel) writes:
>>In article <1jo2g2INNs9e@neuro.usc.edu> merlin@neuro.usc.edu (merlin) writes:
>>>Does OS/2 2.1 beta support memory mapped files for user processes?
>>
>>Not as far as I know.
>
>I thought that the PAG_GUARD allocation flag of the DosAllocMem
>function in conjunction with XCPT_GUARD_PAGE_VIOLATION exception is
>sufficient support to write a user-mode memory mapped file.
>
>Am I wrong?
I think the original question points to the so-called Berkeley mmap().
OS/2 itself might be supporting the SYSV version of shared memory,
but I am not so sure. As for mmap, a general call would be
mmap(address, lengnth, protection, flags, fd, offset)
You can map the file fd into physical memory address in this way.
Since every physical device in Unix is in /dev and is described
as a file, the method becomes very general and powerful. I believe
that the memory management mechanism in OS/2 does not support such
a call, currently.
Wen-Chun Ni, wcn@cs.brown.edu
-------------------------------------------------------------------
"Great spirits have always encountered violent opposition
from mediocre minds..." -- Albert Einstein
Technical Details
Message-ID:
<1993Jan26.071521.469@cs.brown.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!brunix!brunix!wcnReferences:
<1jo2g2INNs9e@neuro.usc.edu> <727805912rommel.root@jonas.gold.sub.org> <1993Jan26.055912.20063@netcom.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!brunix!brunix!wcn From: wcn@cs.brown.edu (Wen-Chun Ni) Subject: Re: Does OS/2 support Memory Mapped Files ? Message-ID: <1993Jan26.071521.469@cs.brown.edu> Sender: news@cs.brown.edu Organization: Brown University Department of Computer Science References: <1jo2g2INNs9e@neuro.usc.edu> <727805912rommel.root@jonas.gold.sub.org> <1993Jan26.055912.20063@netcom.com> Date: Tue, 26 Jan 1993 07:15:21 GMT Lines: 31