1834307 Members
2739 Online
110066 Solutions
New Discussion

chatr utility

 
Gerardo Martinez
New Member

chatr utility

My question is this. Can an program be written to use more than 1GB of memory without using the chatr utility in HP11 to enable private 3rd and 4th quadrant memory spaces? 
I tried -N in compiling, it compiled clean but was not able to access any more memory than I had without the above option.

6 REPLIES 6
Sundar_7
Honored Contributor

Re: chatr utility

I think at the link time, you need to link the binary as type SHMEM_MAGIC.

Binaries that are linked as type SHMEM_MAGIC can access more than 1GB.
Learn What to do ,How to do and more importantly When to do ?
Patrick Wallek
Honored Contributor

Re: chatr utility

Is this a 32-bit or 64-bit program? Since you are talking about memory quadrants I assume you are talking about 32-bit programs.
Either way, you should also take a look at your max?siz (maxdsiz, maxtsiz, maxssiz, maxdsiz_64, maxtsiz_64, maxssiz_64) kernel parameters as they could potentially be holding you back as well.
Gerardo Martinez
New Member

Re: chatr utility

would anybody be able to clarify the use of the chatr utility? Specifically what does enabling 3rd and 4th quadrant private spaces actually buy me? I recall reading somewhere that the quadrants were reserved for specific memory operations and program data was limited to the 2nd quadrant.

Patrick you are correct it is a 32 bit application. I will look into our kernel configuration. Thank You.
Patrick Wallek
Honored Contributor

Re: chatr utility

There is a good white paper on memory management and it should be on your machine.

Check for /usr/share/doc/mem_mgt.txt

Have a read through that document and it should explain a lot of things.

It is also available online:

Memory Management Whitepaper Part I -
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062686726

Memory Management Whitepaper Part II -
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000009254450

ranganath ramachandra
Esteemed Contributor

Re: chatr utility

just fyi: the linker also takes the +q3p/+q4p options, you dont need to first build the program and then run chatr on it separately.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

Dietmar Konermann
Honored Contributor

Re: chatr utility

In fact, the whole story is written in the Memory Menagement White Paper. However... by default a 32bit process uses its 4GB address space by default as SHARE_MAGIC (chatr shows: "shared executable"):

Q1 Shared Text
Q2 Private Data
Q3 Shared
Q4 Shared

When you build an EXEC_MAGIC executable using the -N linker option (chatr shows: "normal executable"), then this layout changes:

Q1 Private Text+ Private Data
Q2 Private Data
Q3 Shared
Q4 Shared

You no longer have shared text here... Q1 gets private and so your text gets private also (which is a compromise, of course).

As you can see, in both scenarios Q3 and Q4 keep unchanged. You can _additionally_ configure q3p/q4p... of course your space for shared objects gets smaller then, which is also a compromise of course.

You wrote, that you are still limited to 1GB data with -N (EXEC_MAGIC). In fact you should get more if maxdsiz is large enough, if enough free swap is avialable for reservation ("Total" in swapinfo -t) and if there is no additional ulimit active. Of course you won't get the complete 2GB, since your text and your stack sits in Q1 also.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)