× 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.



Hello John,

Given that you said "I'm building a service program (in RPG) with the
intent of simplying the use of dynamic heap storage."

I honestly can't see anything simpler than the supplied RPG IV op-codes:

        ALLOC
        REALLOC
        DEALLOC

You also said:

>This is only good for the default (ILE) heap.

IBM provide a set of ILE storage management APIs that let you define you
own heap and control the allocation strategy.

>From the ILE API Reference:
"The storage management APIs fall into the following categories:

Basic heap operations
        o Free Storage (CEEFRST) API frees one previously allocated heap
          storage.
        o Get Heap Storage (CEEGTST) API allocates storage within a heap.
        o Reallocate Storage (CEECZST) API changes the size of previously
          allocated storage.

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

Heap allocation strategies
        o Define Heap Allocation Strategy (CEE4DAS) API defines an
          allocation strategy that determines the attributes for a heap
          created with the CEECRHP API. "

If these APIs are too difficult for your target programmer then wrap them
up in a service program but at least they may make your efforts easier.

Regards,
Simon Coulter.

--------------------------------------------------------------------
   FlyByNight Software         AS/400 Technical Specialists
   http://www.flybynight.com.au/

   Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
   Fax:   +61 3 9419 0175   mailto: shc@flybynight.com.au   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.