home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!mintaka.lcs.mit.edu!zurich.ai.mit.edu!jinx
- From: jinx@zurich.ai.mit.edu (Guillermo J. Rozas)
- Newsgroups: comp.sys.hp
- Subject: mmap on HP-UX 9.0 on s700
- Message-ID: <JINX.92Nov6221113@chamarti.ai.mit.edu>
- Date: 7 Nov 92 03:11:13 GMT
- Article-I.D.: chamarti.JINX.92Nov6221113
- Sender: news@mintaka.lcs.mit.edu
- Reply-To: jinx@zurich.ai.mit.edu
- Organization: M.I.T. Artificial Intelligence Lab.
- Lines: 43
-
- I've been reading the documentation (LaserRom) for the mmap system
- call in HP-UX 9.0 and I have some questions about how it applies to
- the s700.
-
- The documentation claims that mapped files shared among multiple
- processes must be mapped to the same virtual address in all the
- processes because of architectural restrictions. It also claims that
- MAP_FIXED generally will fail even if it is a private (MAP_PRIVATE)
- mapping.
-
- On reading the 1.1 architecture reference I found that there is a
- limited degree of virtual address aliasing allowed by the architecture
- (version 1.0 allowed none). 64-bit global Virtual addresses differing
- only in 12 specific bits space-identifier bits are allowed to be
- mapped to the same physical address.
-
- Additionally, as far as I know, the current s700 hardware (models 705,
- 710, 720, 730, and 750, I don't know about the 74x) have direct-mapped
- caches which properly divide 256kbytes, thus the caches should be able
- to support aliasing of virtual addresses whose lower-order 18 bits
- match.
-
- What I don't understand is why a stronger restriction is imposed on
- the use of MAP_FIXED in conjunction with MAP_SHARED. The restriction
- specified for the s700 (and for the s800, but I can understand it in
- this case since there are machines based on version 1.0 of the
- architecture) should be weaker, namely that only certain addresses are
- valid for MAP_FIXED, but the restriction stated is that the addresses
- must be the same.
-
- Can someone explain this to me?
-
- Is there any range of addresses (e.g. between 0x40000000 and
- 0x80000000) for which MAP_FIXED in conjunction with MAP_PRIVATE will
- not fail?
-
- I ask this because there is a GNU package (mmalloc) that uses mmap
- instead of sbrk to allocate memory. It can be used to detach the
- memory segment for subsequent re-attachment, or for other purposes.
- However, there is an implicit assumption in the code that successive
- calls to mmap can allocate a contiguous range (the way that calls to
- sbrk do) by specifying the address for later calls, yet this is not
- (apparently) guaranteed to work on the s700 in HP-UX 9.0.
-