- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Get available virtual address space of process
Operating System - HP-UX
1753487
Members
4718
Online
108794
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
11-05-2008 05:25 AM
11-05-2008 05:25 AM
Get available virtual address space of process
All,
I would like to know how can i know the limit on the virtual address space of a 32-bit process. The breakdown for the kernel and user space addressing for a process.
If i can know about the kernel address space size i can get the size available to a process for user addressing using malloc and mmap etc.
Can somebody help me out with this? Also the api, getrlimit(RLIMIT_AS, ..) isn't working and returning RLIM_INFINITY meaning no limit is defined -- what is this?
Best regards,
RUI
I would like to know how can i know the limit on the virtual address space of a 32-bit process. The breakdown for the kernel and user space addressing for a process.
If i can know about the kernel address space size i can get the size available to a process for user addressing using malloc and mmap etc.
Can somebody help me out with this? Also the api, getrlimit(RLIMIT_AS, ..) isn't working and returning RLIM_INFINITY meaning no limit is defined -- what is this?
Best regards,
RUI
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2008 06:50 AM
11-05-2008 06:50 AM
Re: Get available virtual address space of process
Um... what? Unless you're still talking 32-bit HP-UX (11.0 or 11.11) there's no kernel addressing in a user process. [And sorry -- I don't see a point in discussing 32-bit kernels.]
Frankly, I think the simplest thing to do would be to point you at: http://docs.hp.com/en/8681/aas_white_paper.pdf
That gives the general 32-bit breakdown and the differences between the magics for 32-bit.
For malloc -- the maximum size is _always_ the minimum of the soft rlimit for RLIMIT_DATA, the amount of swap available (pst_vminfo.psv_swapmem_max + pst_vminfo.psv_swapspc_max) and the delta between the current end of the heap (PS_DATA object -- pstat_getprocvm() iteration is how you find this) and the next object in the process [may be the PS_STACK, could be private mmap]. Obviously, this is a moving target (swap can come back, that private mmap can go away).
The nice thing about the above method -- it works regardless of Magic / Address space issues because the kernel always puts the Heap and the Stack at opposite ends of the private (data) address space on all supported releases of HP-UX.
For mmap() -- that's a loaded question. If it is file backed -- swap does not limit it at all. If is MAP_ANONYMOUS, swap will come into play. Otherwise, you have to differentiate between MAP_PRIVATE vs. MAP_SHARED (different virtual address space areas) and the address space layout of the process (MGAS vs. MPAS, type of Magic, etc.)
Frankly, I think the simplest thing to do would be to point you at: http://docs.hp.com/en/8681/aas_white_paper.pdf
That gives the general 32-bit breakdown and the differences between the magics for 32-bit.
For malloc -- the maximum size is _always_ the minimum of the soft rlimit for RLIMIT_DATA, the amount of swap available (pst_vminfo.psv_swapmem_max + pst_vminfo.psv_swapspc_max) and the delta between the current end of the heap (PS_DATA object -- pstat_getprocvm() iteration is how you find this) and the next object in the process [may be the PS_STACK, could be private mmap]. Obviously, this is a moving target (swap can come back, that private mmap can go away).
The nice thing about the above method -- it works regardless of Magic / Address space issues because the kernel always puts the Heap and the Stack at opposite ends of the private (data) address space on all supported releases of HP-UX.
For mmap() -- that's a loaded question. If it is file backed -- swap does not limit it at all. If is MAP_ANONYMOUS, swap will come into play. Otherwise, you have to differentiate between MAP_PRIVATE vs. MAP_SHARED (different virtual address space areas) and the address space layout of the process (MGAS vs. MPAS, type of Magic, etc.)
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP