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




I've always labored under the impression that the AS400 was able to keep a
program from overstepping its bounds, memory-wise; i.e. I cannot write an
HLL program that will modify the memory allocated by another program,

What is a parameter? It's a pointer to the memory of another program that you can change. So, yes, you can definitely change the memory that belongs to another program!

or at least, certainly not by another job.

You can also modify another program's space -- after all that's part of the idea of single level store. One big memory space for everything. However, it's extremely unlikely that you'd do this by mistake.

I also have this idea that it's not possible for a program to modify its own executable code, only the data portion of its memory.

That's true, unless you do some special stuff to circumvent it, the system won't let you point a space pointer (a pointer to data) to executable code. It needs a different pointer type (a system pointer, or procedure pointer or whatever) to do that. If you read Leif's e-book on MI programming, you can learn how to work around this stuff -- but you'd never do it by mistake.

I guess my question is, what are the system-enforced memory boundaries for a
program?  The program's data segment?  Any memory available to the job it's
running in?

Most of the time if you're doing it by mistake you'll either get un-allocated memory, or data storage from another program in the job. But, do remember, that the operating system does store some of it's per-job stuff in your job's memory. (Though, the really critical stuff is protected.)

I've already seen people completely screwup the database manager of the operating system by overwriting some of it's internal memory.

99% of the time, you'll screw up your caller's memory or you'll hit unallocated space.

The point, though, is don't just assume that the memory you hit will be safe to use. If it tells you it's passing 3 parameters, don't try to use the 4th. We want to keep our repuation as a stable platform!

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.