Hi, Paul:

The RPG IV ALLOC and REALLOC and DEALLOC statements, and the %ALLOC, %REALLOC and %DEALLOC BIFs all use the ILE activation group based heap.

If your program specifies DFTACTGRP(*YES) this storage will not be freed until "end of job" (unless you specifically DEALLOC it.)

If your program specifies ACTGRP(*NEW), then this storage is freed as soon as this program returns (when the *NEW activation group is automatically reclaimed), unless explicitly DEALLOCated beforehand.

If your program specifies a named (persistent) activation group, the storage is not freed until a RCLACTGRP is issued for that named activation group, or end-of-job, unless explicitly DEALLOCated beforehand.

If your program specifies ACTGRP(*CALLER):
If the program is called from the default activation group, the storage is not freed until end-of-job, unless specifically DEALLOCated;
otherwise, if activated in an ILE activation group, storage is reclaimed when that activation group is reclaimed, unless DEALLOCated.

So, the lifetime of heap storage depends upon which heap it gets allocated from.

Does that "make sense"?

Regards,

Mark S. Waterbury

> PAPWORTH Paul wrote:
If my programme has performed a series of %ALLOC et %REALLOC and is the
boundary of a named activation group , ending my programme will remove
the activation group , but will it also reclaim the storage , in the
same way as %DEALLOC. ?


Thanks in advance

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].