× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




On 17/02/2008, at 6:28 AM, Mark S. Waterbury wrote:

For cases where a long-running job needs to use dynamic storage, I have
found that using "pools" of like storage is useful. The idea is to
allocate all objects of a given "kind" (and lifetime) from the same
"pool" -- this way, when you are done with that "kind" of thing, you
just delete the entire pool. This simplified approach provides many of
the benefits of "generational garbage collection" as seen in Lisp,
Smalltalk, Java, etc., without all the overhead of true garbage
collection.

Yes, I've done similar things in server jobs.


It is fairly easy to do this using ILE heap support by creating a new
ILE heap space for each unique "pool" (via the CRTHS MI instruction)
then allocating from that specific heap, as needed (via the ALCHSS MI
instruction). Then, when done with that "pool" of objects, issue the
DESHS MI instruction for that particular heap.

Perhaps even easier using the ILE Storage Management APIs:

Extended Heap Operations APIs
The extended heap operations APIs are:

Create Heap (CEECRHP) creates a new heap.
Discard Heap (CEEDSHP) discards an existing heap.
Mark Heap (CEEMKHP) returns a token that can be used to identify heap storage to be freed by the CEERLHP API.
Release Heap (CEERLHP) frees all storage allocated in the heap since the mark was specified.


Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.