Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX 11i Version 3 Release Notes: HP 9000 and HP Integrity Servers > Chapter 9 Commands and System Calls

mmap() System Call

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

mmap() function to establish mapping between a process’ address space and a file

Summary of Change

What’s New for Customers Migrating from HP-UX 11i v1 September 2005?

PROT_EXEC: The HP-UX mmap() system call requires execute permission to map a file with MAP_SHARED and PROT_EXEC. According to the Single UNIX Specification, Version 3 (a.k.a. UNIX 2003), to map a file with MAP_SHARED and PROT_EXEC, mmap() needs to have only read permission for the file being mapped. In HP-UX 11i v3 (11.31) we have made changes in mmap() implementation to address this issue. In HP-UX 11i v3 (11.31) the mmap() function requires only read permission to map a file with MAP_SHARED and PROT_EXEC.

MAP_FIXED: The mmap() function can be called with the flag MAP_FIXED to establish a mapping at an address range specified by the arguments pa and len. According to the Single UNIX Specification, Version 2 (a.k.a. UNIX 98) the mapping established by mmap() with MAP_FIXED replaces any previous mappings for those whole pages containing any part of the address space of the process starting at pa and continuing for len bytes. In HP-UX 11i v1 (11.11) mmap() previously failed where there is already a mapping in the specified address range. In HP-UX 11i v3 (11.31) HP has made changes in mmap() implementation to replace any previous mappings for those whole pages containing any part of the address space of the process starting at pa and continuing for len bytes and establish the new mapping.

What’s New for Customers Migrating from HP-UX 11i v2 June 2006?

See “What’s New for Customers Migrating from HP-UX 11i v1 September 2005?”

Impact

Applications which call mmap() and succeed in mapping will not see any difference. However, any application where mmap() previously failed for not having execute permission for the underlying file will now succeed.

Applications that follow the mmap() behavior according to the standards and/or HP-UX mmap(2) manpage will not be impacted by this change. Ill-behaved applications which presumes that mmap() with MAP_FIXED will fail if there is any mapping in the specified address range will be impacted.

Compatibility

PROT_EXEC: There are no known compatibility issues. However, there is the possibility that applications which call mmap() without execute permission for the file being mapped will succeed.

MAP_FIXED: There are no known compatibility issues.

Performance

There is no impact on performance.

Documentation

See the mmap(2) manpage.

Obsolescence

Not applicable.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2006-2007 Hewlett-Packard Development Company, L.P.