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



>My question to everyone against dynamically
>allocating memory is how much processing time
>and disk space are you loosing if you specify
>an array to be DIM(9999) when you only need 5
>elements but next year you may need 100 and
>the next maybe 1000.  Now weigh that against
>dynamically allocating the array.

I gave up trying to out-think the paging algorithm many years ago.  OS/400
is not MSDOS with an accent.  If you allocate a 16 megs of memory and only
use 1 byte of it, the other 15 and change megs will get paged over.  That
is, the system will KNOW that this memory is unused and will use it
elsewhere.

This does NOT address time to initialise 16 megs of memory, just the working
set size (after the program has been running a while.)

I would say that there needs to be some pretty good justification as to why
dynamic memory is needed rather than use more customary mechanisms like SQL,
OPNQRYF, Logical files or even Load/Sort/Print.  RPG and OS/400 are tailored
to these sorts of workloads and can tune and adapt very well to them.  If
dynamic memory is a better fit, I strongly recommend the iSeries-toolkit
http://www.iseries-toolkit.org/.  Use the wrappers provided there rather
than roll your own.
  --buck


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.