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



Thanks for your help, Barbara, Scott, Jon.  I've now got everything stripped
all the way down to no memory management at all (maximum sizes defined on
the d-specs) and everything works fine.  So I'll have to start adding things
back in one at a time to try to determine where the problem is.

> -----Original Message-----
> From: Barbara Morris [SMTP:bmorris@ca.ibm.com]
> Sent: Friday, January 03, 2003 11:59 AM
> To:   rpg400-l@midrange.com
> Subject:      Re: Memory Allocation Question
>
> Nelson, the pointer you get points somewhere within some huge heap of
> storage.  You physically actually have access to everything in the heap
> following your storage.  The debugger doesn't know how much you
> allocated, so it shows everything it physically can.
> (Try eval arr(1..40) to limit the number of elements shown by the
> debugger.)
>
> If the pointer itself has been corrupted, the debugger will display it
> as SPP:*NULL.
>
> The only thing I can think of is that you have reallocated the DS but
> that you still have access to the original allocated pointer.  That
> original pointer will still be pointing into valid storage in the heap,
> but it won't actually be allocated to you any more.
>
>     p = %alloc(100);
>     p2 = realloc(p : 200);
>
> After the realloc, trying to deallocate or reallocate p will result in
> an error.  But p will still look good, and although any reference to the
> storage pointed to by p is illegal, you will not get an error for doing
> it.  At least you won't get an error right away, but bad things could
> happen eventually if the original p storage gets allocated somewhere
> else.
>
>


************************************************************************************************************************************************************************************************************
This message originates from Lincare Holdings Inc. It contains information 
which may be confidential or privileged and is intended only for the individual 
or entity named above.
It is prohibited for anyone else to disclose, copy, distribute or use the 
contents of this message.
All personal messages express views solely of the sender, which are not to be 
attributed to Lincare Holdings Inc., and may not be copied or distributed 
without this disclaimer.
If you received this message in error, please notify us immediately at 
MailAdmin@lincare.com or (800) 284-2006.
************************************************************************************************************************************************************************************************************



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.