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



Hi Stephen,

> Dear Sir or Madam,

You know that your message was posted to a public mailing list, right?
that it's going to hundreds of people, and will be archived in a public
place on the Internet?

> I'm define 507 fields at 6063 characters and the program compiles just
> fine.
> When I go to 508 fields at 6073 characters the program does not compile
> giving me the attached job log.

The error message in the job log is MCH4216, which states that you've
exceeded the maximum amount of automatic storage that a procedure can
have.

"Automatic storage" is the memory where a subprocedure's local variables
are stored.  (Variables that are not global to the entire program are
"local variables.")

I'm curious as to what you're doing that you need more than 16mb of RAM
that's local to a single subprocedure!

At any rate, here are some possible solutions:

a) If possible, make your code more efficient so that it doesn't need so
much space.

b) Split your routine into multiple subprocedures so that they're not all
active at once, and therefore not all using memory at once.

c) Store large variables each in their own user space.  Yes, this
complicates the code, but allows you to use shared storage, and if it runs
out of RAM, it'll use disk.  Each variable in it's own space will give
each variable 16mb of possible space, instead of 16mb total for the entire
procedure.

d) If necessary, allocate space manually with the %alloc() BIF or ALLOC
op-code instead of using automatic storage.  This is very similar to using
user spaces, but will hog more RAM, and use disk less.  Depends on how you
want to optimize your code, I guess.  Don't forget to de-allocate!

Good Luck


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.