View previous topic :: View next topic
|
Author |
Message |
shashi1026
New User
Joined: 18 Nov 2008 Posts: 3 Location: Chennai
|
|
|
|
Hi
could you please tell the differences between the PL/1 builtin function ALLOCATE and the routine CEEGTST used for dynamic memory allocation.
Thanks.
Shashi |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
reading the manual and considering the parameters used for the invocation
should have already told You the difference...
have You looked at the manual yet ?
1) from a formal point of view
ALLOCATE is a PL/I statement ( the form should clarify what I mean )
GEEGTST is an external subroutin/function to get a generic chunk of storage from he heap
given point 1
DCL something CONTROLLED
ALLOCATE something
PL1 takes care of everything
CEEGTST ( see the proper parameters )
You MUST care of everything
- pointers and all the stuff |
|
Back to top |
|
|
shashi1026
New User
Joined: 18 Nov 2008 Posts: 3 Location: Chennai
|
|
|
|
Hi Enrico Sorichetti ,
Thanks for the reply.
I think my question was too generic.
I would like to know whether both ALLOCATE & CEEGTST will do same kind of operation ie. allocating a block of memory from heap.
Could you please tell if a program MAIN calls a service program ABC dynamically, and in ABC we are allocating a block of memory and populates it and returning the pointer to the allocated memory to the MAIN program. Then whether the memory block be available in MAIN program or will it be lost as ABC is called dynamically ?
Will allocating memory block using ALLOCATE , behave the same as allocating it using CEEGTST ? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
looks like You didn' t read carefully my answer,
and You did not look at the manual
You had another topic on the same subject and You got good answers
why keep asking ??? |
|
Back to top |
|
|
|