>In a program, you can issue the BPX LOAD service to load a program
into memory... and similar to the LOAD macro, this returns the address
where the module was loaded, and the starting address.

>Now - is there any guarantee that if you then do a BPX FORK and then
a BPX EXEC to execute the module, that the module will be loaded at the same
address in the child?


The fork does a one by one copy of the address space (except from non-UNIXish 
things such as "DD allocations"). So the "BPX LOADed" load module is still at 
the same address. However, BPX EXEC is the equivalent of terminating the 
current job step, and starting a new job step where the BPX EXEC module will be 
the job step program.


I therefore say the answer is NO.


The only case where it could be loaded at the same address is when the BPX 
EXECed the load module is the same as the job step load module in the parent 
address space. But, I have never looked into an EXECed address space to see if 
that is the case or not.
 --
Peter Hunkeler

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to