- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Problem with mmap() function.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2006 12:10 AM
тАО06-26-2006 12:10 AM
Solved! Go to Solution.
- Tags:
- mmap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2006 12:17 AM
тАО06-26-2006 12:17 AM
Re: Problem with mmap() function.
Based on the description, I presume that the errno is ENOMEM. If this is the case, then there is probably not enough apace in the process address space to accomodate mapping the file.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2006 02:13 AM
тАО06-26-2006 02:13 AM
Re: Problem with mmap() function.
See "How much memory can a process use?":
http://www.faqs.org/faqs/hp/hpux-faq/section-142.html
maxdsiz may have to be increased, which means recompiling your kernel.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2006 03:35 AM
тАО06-26-2006 03:35 AM
Re: Problem with mmap() function.
I tried increasing maxssiz and maxtsiz to maximum value but still fails with same error. This error is occuring sometimes only. For same file 2/3 times mmap() call will succeed then 3/4 time it will fail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2006 03:38 AM
тАО06-26-2006 03:38 AM
Re: Problem with mmap() function.
Did you increase maxdsiz? Did you recompile the kernel and then reboot?
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2006 03:41 AM
тАО06-26-2006 03:41 AM
Re: Problem with mmap() function.
If this is MAP_PRIVATE do _not_ raise maxssiz -- you're hurting yourself if you do. All private heap/mmaps/stack comes from the same area of private address space. Increasing maxssiz means you've reserved more of that address space for the stack -- and you therefore have less for heap or mmaps.
- Tags:
- maxssiz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2006 04:58 AM
тАО06-26-2006 04:58 AM
Re: Problem with mmap() function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2006 05:20 AM
тАО06-26-2006 05:20 AM
Solutionhttp://www.docs.hp.com./en/B2355-60103/mmap.2.html
The way that the system works does not allow multiple mappings of one file at different addresses. That means that an mmap call using MAP_SHARED can get ENOMEM because other processes have mapped that file and the initial mapping requires your process to put a new mmap mapping in an address range that your process is already using. Or your process may be unable to map a new range in a file because it would require addresses that some other shared mapping is already using.
If you are on an Itanium platform with the HP-UX 11iV2 release, then you can use the "chatr +as mpas" setting to avoid these limitations. The mpas feature is described in detail at
h20338.www2.hp.com/hpux11i/downloads/aas_white_paper.pdf
- Tags:
- MPAS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-27-2006 12:17 AM
тАО06-27-2006 12:17 AM
Re: Problem with mmap() function.
Thank you for your suggestions. In Mike's link, I found that, process using memory map using mmap() function should close it with munmap() function without fail before process/thread goes off.It will not allow other process/thread to open new memory map for same file. My Application contains many threads, one thread doesn't close memory map. When I fixed it, I found problem never occurred any more. Thanks a lot.