GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Share_magic, exec_magic, and shmem_magic
Operating System - HP-UX
1855149
Members
4228
Online
104109
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp
Knowledge Base
Discussions
Forums
Discussions
back
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
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
12-12-2002 02:01 PM
12-12-2002 02:01 PM
Share_magic, exec_magic, and shmem_magic
I am on a 9000 box with 11.00, what are the meanings of those words? and how do I tell which one I am running? or do you run all 3 for different purposes?
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2002 02:12 PM
12-12-2002 02:12 PM
Re: Share_magic, exec_magic, and shmem_magic
Hi Jeff,
They're compiler or chatr flags as follows:
-N linker option (EXEC_MAGIC flag) to access private data spaces larger than .75 GB
-M option to chatr (SHMEM_MAGIC flag) to access shared memory larger than 1.75 GB
Magic Numbers
Recorded with each executable program is a magic number that determines how the program should be loaded. There are three possible values for an executable file's magic number:SHARE_MAGIC The program's text (code) can be shared by processes; its data cannot be shared. The first process to run the program loads the entire program into virtual memory. If the program is already loaded by another process, then a process shares the program text with the other process.
DEMAND_MAGIC As with SHARE_MAGIC the program's text is shareable but its data is not. However, the program's text is loaded only as needed -- that is, only as the pages are accessed. This can improve process startup time since the entire program does not need to be loaded; however, it can degrade performance throughout execution.
EXEC_MAGIC Neither the program's text nor data is shareable. In other words, the program is an unshared executable. Usually, it is not desirable to create such unshared executables because they place greater demands on memory resources.
By default, the linker creates executables whose magic number is SHARE_MAGIC. The following shows which linker option to use to specifically set the magic number.
Table 1 Magic Number Linker Options To set the magic number to: Use this option:
SHARE_MAGIC
-n
DEMAND_MAGIC
-q
EXEC_MAGIC
-N
HTH,
Jeff
They're compiler or chatr flags as follows:
-N linker option (EXEC_MAGIC flag) to access private data spaces larger than .75 GB
-M option to chatr (SHMEM_MAGIC flag) to access shared memory larger than 1.75 GB
Magic Numbers
Recorded with each executable program is a magic number that determines how the program should be loaded. There are three possible values for an executable file's magic number:SHARE_MAGIC The program's text (code) can be shared by processes; its data cannot be shared. The first process to run the program loads the entire program into virtual memory. If the program is already loaded by another process, then a process shares the program text with the other process.
DEMAND_MAGIC As with SHARE_MAGIC the program's text is shareable but its data is not. However, the program's text is loaded only as needed -- that is, only as the pages are accessed. This can improve process startup time since the entire program does not need to be loaded; however, it can degrade performance throughout execution.
EXEC_MAGIC Neither the program's text nor data is shareable. In other words, the program is an unshared executable. Usually, it is not desirable to create such unshared executables because they place greater demands on memory resources.
By default, the linker creates executables whose magic number is SHARE_MAGIC. The following shows which linker option to use to specifically set the magic number.
Table 1 Magic Number Linker Options To set the magic number to: Use this option:
SHARE_MAGIC
-n
DEMAND_MAGIC
-q
EXEC_MAGIC
-N
HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2002 02:31 PM
12-12-2002 02:31 PM
Re: Share_magic, exec_magic, and shmem_magic
Hi,
They are different ways the system can use the
virtual memory space. The 32-bit address space is devided into four quadrants with first three with 1GB size and the lastone into two parts of 0.75 GB and 025 for IO.
With shmem_magic, you can go upto 2.75 G of shared memory(Q2+Q3+.75Q4) with the exception that Q2 is to be used only for shared memory segments while Q3 and Q4 are for general shared purposes.
With Exec_magic will allow you to use Q1 (which is meant for text segment) for DATA also while Q2 is still used for DATA and Q3 and .75Q4 are for shared purposes.
The default configuration Share_magic makes Q1 for Text Q2 for Data, Q3 and .75Q4 for Shared Memory.
So if you don't compile your application with the corresponding options for exec_magic and shmem_magic, you will get share_magic.
-Sri
They are different ways the system can use the
virtual memory space. The 32-bit address space is devided into four quadrants with first three with 1GB size and the lastone into two parts of 0.75 GB and 025 for IO.
With shmem_magic, you can go upto 2.75 G of shared memory(Q2+Q3+.75Q4) with the exception that Q2 is to be used only for shared memory segments while Q3 and Q4 are for general shared purposes.
With Exec_magic will allow you to use Q1 (which is meant for text segment) for DATA also while Q2 is still used for DATA and Q3 and .75Q4 are for shared purposes.
The default configuration Share_magic makes Q1 for Text Q2 for Data, Q3 and .75Q4 for Shared Memory.
So if you don't compile your application with the corresponding options for exec_magic and shmem_magic, you will get share_magic.
-Sri
You may be disappointed if you fail, but you are doomed if you don't try
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.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP