- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- pmap - anonymous segment
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
Forums
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
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
тАО08-28-2009 10:19 AM
тАО08-28-2009 10:19 AM
pmap - anonymous segment
Have a created sample dynamic SO using sample program
void manipulate()
{
printf("Hello\n");
return;
}
If i load this SO , using dlopen and do pmap on this SO , i get following below which i did not expect , as i don't have any variables i did not expect any private Data taken at loading.
When we did pmap after loading SO , we still got anonymous data of 108 KBS
FILE VSZ
[anonymous] 4K PD
[anonymous] 16K PD
[anonymous] 48K PD
[anonymous] 16K PD
[anonymous] 8K PD
[anonymous] 8K PD
[anonymous] 8K PD
What does this anonymous segments signify.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-29-2009 01:09 AM
тАО08-29-2009 01:09 AM
Re: pmap - anonymous segment
(These are called shared libs on HP-UX.)
>I don't have any variables I did not expect any private Data taken at loading.
Even if you have no data, you need a linkage table to call things and to reference that string.
>What does this anonymous segments signify?
You have to track down the callers.
Typically shlibs may have two private mmaps, one for data and one for bss.
Thread stacks are also mmapped.
Also, dld needs mmaps for its symbol table, possibly those 8 K ones.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-29-2009 10:09 AM
тАО08-29-2009 10:09 AM
Re: pmap - anonymous segment
i am trying to optimise memory utilisation of my application ( which is very huge in terms of LOC , millions of lines of code) .
Anonymous segments are shown even if i have global variables .
in such cases how to distinguish
memory taken by
1) dynamic loader
2) application variable .
Ideally memory taken by dynamic loader should have been shared Data and not private Data .
Regards
Tanmay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-29-2009 05:50 PM
тАО08-29-2009 05:50 PM
Re: pmap - anonymous segment
Code is free, how many Mb of data do you have? How many simultaneous users will you have?
>Anonymous segments are shown even if I have global variables.
Naturally. All shlib static storage duration data is mmapped private.
>in such cases how to distinguish memory taken by
1) dynamic loader
2) application variable.
If the size is based on the output of size(1), then it is user data, otherwise it is dld, thread stacks or application mmap(2) calls. If it shows up in gdb's "info shared", then it is 2).
Or as a gedanken experiment, increase the size of your data to N Mb and anything smaller is dld's.
>Ideally memory taken by dynamic loader should have been shared Data and not private Data.
Why would you think that? This is process specific data and must be private. Only text is mapped shared.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-30-2009 09:50 AM
тАО08-30-2009 09:50 AM
Re: pmap - anonymous segment
Have millons of lines of code in my application . it would not be possible to change the code .
Will have 1200 users connecting to my application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-30-2009 10:41 AM
тАО08-30-2009 10:41 AM
Re: pmap - anonymous segment
I'm saying that the cost of code is nearly "free", it is only data that matters.
>Will have 1200 users connecting to my application.
So every data item is multiplied by 1200.
Unless you change your application to use threads and not processes. Or use shared memory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2009 11:04 PM
тАО09-12-2009 11:04 PM