View previous topic :: View next topic |
Author |
Message |
Nimesh Srivastava Beginner

Joined: 22 Jul 2003 Posts: 13 Topics: 8
|
Posted: Tue Jul 22, 2003 9:50 am Post subject: Difference in memory from getmain & malloc to calling pr |
|
|
Hi,
I am trying to pass Commarea to a program, via XCTL or LINK command
allocating memory to the COMMAREA via malloc or GETMAIN.
Whats the difference between the two and which is the one preferred? |
|
Back to top |
|
 |
Nimesh Srivastava Beginner

Joined: 22 Jul 2003 Posts: 13 Topics: 8
|
Posted: Sat Dec 06, 2003 1:24 am Post subject: |
|
|
Hi,
I got the answer for my question. Posting it for the reference of others.
Essentially the main difference between malloc or new and GETMAIN is
once an function like malloc or new is called an SVC(supervisory call) to the OS is made from the application to request for the memory.
whereas when an GETMAIN command is used application program requests the CICS SCP (storage control program) for the memory. This memory is used for the DWA(dynamic work area) in programs practising re-entrancy.
Regards,
Nimesh |
|
Back to top |
|
 |
|
|