× 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 would be careful when looking at the allocated size using MI.  I'm not
sure if MI will report the actual number of bytes used, or the allocated
memory.  I'm not real familiar with what goes on behind the scenes in the
AS/400.

I know that for the PC, if I request a certain number of bytes, (say 1000),
I may actually get allocated 1024 bytes, although for all purposes, I only
know about the 1000 bytes I requested.  Having to do with page sizes, etc.
I am guaranteed to either receive at least the number of bytes I requested,
or a NULL pointer indicating that there wasn't enough memory available.

So if you are looking at the allocated memory using MI you might be told
that 1024 bytes are allocated when the original program/memory allocator
only "knows" about 1000 bytes.

Then again, it may no be an issue on the AS/400, I just don't know.  You
might want to look into this and consider if you even care how much the
original allocator thinks it owns.

Regards,

Jim Langston

From: John Taylor [mailto:jtaylor@rpg2java.com]

And if I don't, I'm just going to have problems of a different sort. :)

Imagine someone passing me a pointer that wasn't built using my custom
allocation routine, and then (by chance) finding an integer anyway when I
peeked behind the curtain for a hidden header that was never created. Oh
what fun those results would be to debug! Of course, such a problem can be
made a lot less likely to occur by adding some type of UUID to the header
section, but even that wouldn't make it bullet proof. I think MI is the only
reliable way to do it.

Thanks for the suggestion though.


John Taylor


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.