If you are interested in sharing private memory between address spaces, there are a number of alternatives: 1. Private Data spaces which require an ALESERV to put an ALET in each work unit access list. 2. Common Area Data Spaces (CADS) which have a global ALET that can be used anywhere. 3. In 64 bit, there is IARV64 SHAREMEMOBJ If coding in C, you can use shmget() to create a shared memory segment and shmat to attach to it. If not coding in C, you can use the kernel services BPX1MGT (Get shared memory), and BPX1MAT to attach to it. Change 1 to 4 to for 64 bit. The kernel shared memory alternatives create a persistent shared memory object that can tolerate the termination of the address space (process) that created it. Data spaces tend to go away when the creator terminates. If you want a persistent CADS, sometimes people schedule an SRB to MASTER to create the CADS. The advantage of using USS shared memory, is that you don't use an ALET to access the storage. This makes life considerably simpler. HLLs don't support ALETs, so data spaces don't work too well. When coding in assembler, keeping track of ALETs is annoying. When using USS shared memory, you have options. 1. Sharing at a page level, high overhead and usually unnecessary 2. Sharing at a segment level. The kernel and RSM manage shared page tables. 3. For 64 bit, sharing at a Gig level. The kernel and RSM managed shared region tables and page tables. For 64 bit, you are guaranteed to get the same virtual address in every address space, which is very convenient, since now you can use pointers within the shared segment. With the 31 bit versions, you can request the same virtual address on shmat, but there is no guarantee it will be available. In 31 bit, the kernel uses private data spaces as the backing for shared memory. The kernel also uses CADS for processing things like fork. When we designed 64 bit, we simplified shared memory with the IARV64 implementation. It's mostly RSM magic with page and segment tables. If you want to discuss your application, I should be able to steer you to the best way to share memory.
Don Ault, 845-435-1750 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

