home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / os2 / programm / 8027 < prev    next >
Encoding:
Text File  |  1993-01-26  |  1.8 KB  |  43 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!brunix!brunix!wcn
  3. From: wcn@cs.brown.edu (Wen-Chun Ni)
  4. Subject: Re: Does OS/2 support Memory Mapped Files ?
  5. Message-ID: <1993Jan26.071521.469@cs.brown.edu>
  6. Sender: news@cs.brown.edu
  7. Organization: Brown University Department of Computer Science
  8. References: <1jo2g2INNs9e@neuro.usc.edu> <727805912rommel.root@jonas.gold.sub.org> <1993Jan26.055912.20063@netcom.com>
  9. Date: Tue, 26 Jan 1993 07:15:21 GMT
  10. Lines: 31
  11.  
  12. In article <1993Jan26.055912.20063@netcom.com> ljensen@netcom.com (Colin Jensen) writes:
  13. >In article <727805912rommel.root@jonas.gold.sub.org> rommel@jonas.gold.sub.org (Kai Uwe Rommel) writes:
  14. >>In article <1jo2g2INNs9e@neuro.usc.edu> merlin@neuro.usc.edu (merlin) writes:
  15. >>>Does OS/2 2.1 beta support memory mapped files for user processes?
  16. >>
  17. >>Not as far as I know.
  18. >
  19. >I thought that the PAG_GUARD allocation flag of the DosAllocMem
  20. >function in conjunction with XCPT_GUARD_PAGE_VIOLATION exception is
  21. >sufficient support to write a user-mode memory mapped file.
  22. >
  23. >Am I wrong?
  24.  
  25. I think the original question points to the so-called Berkeley mmap().
  26. OS/2 itself might be supporting the SYSV version of shared memory,
  27. but I am not so sure. As for mmap, a general call would be
  28.  
  29.      mmap(address, lengnth, protection, flags, fd, offset)
  30.  
  31. You can map the file fd into physical memory address in this way.
  32.  
  33. Since every physical device in Unix is in /dev and is described
  34. as a file, the method becomes very general and powerful. I believe
  35. that the memory management mechanism in OS/2 does not support such
  36. a call, currently.
  37.  
  38.  
  39. Wen-Chun Ni, wcn@cs.brown.edu
  40. -------------------------------------------------------------------
  41.   "Great spirits have always encountered violent opposition 
  42.     from mediocre minds..."    -- Albert Einstein
  43.