|
Hi,I have some programs that use large arrays in which I allocate the memory for only the elements I need. For example:
* Selected files array D DS Based(SFPtr) D SelectedFiles 141 Dim(9999) Ascend D SFFileNam 10 Overlay(SelectedFiles:1 ) D SFFileLib 10 Overlay(SelectedFiles:11) D SFNamLib 20 Overlay(SelectedFiles:1 ) D SFFileText 50 Overlay(SelectedFiles:21) ...Now if the program blows up during testing and I take the option to print a dump, it takes forever. For some other programs with similar code, the dump ended because there was not enough memory for the dump program to process all the unused array elements! The problem seems to be that the dump process does not care how memory much is actually allocated to the structure or array, but it looks only at the DIM(9999) field and prints a dump statement for all 9999 elements, which are mostly unused or not addressable. The reason I am using 9999 on the Dim statement is that I don't know how many elements I will need. In the past, I tried specifying fewer elements on the DIM statement, but then I can't add any more elements to the array than are specified in the Dim statement.
Although I am running at V5R3, I am trying to compile back to V5R1.Any suggestions on how to improve the situation? I can always cancel the dump, but then I don't get the values of the variables.
Thanks Dave Murvin DRM Enterprises, Inc.
As an Amazon Associate we earn from qualifying purchases.
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.