1847180 Members
5198 Online
110263 Solutions
New Discussion

Re: EXEC_MAGIC

 
Anurag_7
Advisor

EXEC_MAGIC

Hi All,

What can be the maximum size of the data segment for a EXEC_MAGIC format binary's process?

maxdsiz is set to 2 GB

Thanks for your help.

Anurag
8 REPLIES 8
James R. Ferguson
Acclaimed Contributor

Re: EXEC_MAGIC

Hi:

If your program's text size is relatively small, you can use ~ 1.9 GB with an EXEC_MAGIC binary and a 32-bit executable.

Regards!

...JRF...
Anurag_7
Advisor

Re: EXEC_MAGIC

Thanks for the response James.

There was a particular situation where the porcesses' data segment went upto that limit.

As reported by glance, it was 1.88.

Program crashed :-(

What do u suggest in such a situation.

Please guide.

Anurag
A. Clay Stephenson
Acclaimed Contributor

Re: EXEC_MAGIC

EXEC_MAGIC enables the use of the 1st quadrant (which is normally used for instructions only) to augment the normal data seqment in the 2nd quadrant. Depending upon your text (instruction) size, the maximum data size can approach 2GiB (actually 1.9GiB).
If it ain't broke, I can fix that.
Anurag_7
Advisor

Re: EXEC_MAGIC

Thanks for the response again :-)

There was a particular situation where the porcesses' data segment went upto that limit.

As reported by glance, it was 1.88.

Program crashed :-(

Again, What do u suggest in such a situation?

Please guide.

Anurag
James R. Ferguson
Acclaimed Contributor

Re: EXEC_MAGIC

Hi (again) Anuraq:

If your program reaches this limitation, look to compiling and running it as a 64-bit application.

If that isn't feasible, you will need to look to some re-engineering of your code. Perhaps you could do some I/O at the expense of using memory.

Regards!

...JRF...
Sundar_7
Honored Contributor

Re: EXEC_MAGIC

Anurag,

Alternatively, you can enable the 3rd quadrant for private data usage (ofcourse, this will mean reduced shared resources space).

You can use chatr to enable the private space in 3rd and 4th quadrants

# chatr +q3p enable

Sundar
Learn What to do ,How to do and more importantly When to do ?
Anurag_7
Advisor

Re: EXEC_MAGIC

Hi All,

When i use chatr +q3p enable, i am not able to execute the program at all.

binary permission are -rwxr-xr-x

file command returns file TMApp
"ELF-32 executable object file - IA64"

And when i execute the program, i get the folllowing error.

sh: TMApp : Execute permission denied.

Please guide.

Anurag
Don Morris_1
Honored Contributor

Re: EXEC_MAGIC

See your other thread (q3/q4 private is not supported on IPF, use +as mpas).

Regarding EXEC_MAGIC, you can get data equal to 2Gb - Text - maxssiz - whatever other private objects such as mmap you make.

My guess would be that the rest of your space is maxssiz and your text cost. MPAS will you give you the whole 4Gb to work with (shared objects can be attached, but they'll be mapped private... see http://docs.hp.com/en/5990-6737/ch09s03.html).