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



In my debugging, I've eliminated all references to the pointer except on the
alloc and dealloc statements, so it must be something else I am doing to
other variables that have an effect on it.

The only oddity I notice (and it may just be a quirk of debug) is that the
data structure contains an array of 400 elements, 46 bytes each, and no
matter if I allocate 46 bytes to the pointer or 46*400, I see the entire 400
elements when I do F11 on the ds name.  I'm trying to only use the amount of
memory needed rather than the maximum 400 array elements.  Does Strdbg show
all 400 even if you did not allocate that many?  When I only allocate enough
memory for one array element, some of the area debug is showing me past that
first element is getting into a second ds that is allocated and reallocated.
Could this cause some corruption to the first pointer?  Is that what you
mean by "touching" the pointer?  Is there any way to see the tag bit in
debug?

> -----Original Message-----
> From: Jon Paris [SMTP:Jon.Paris@Partner400.com]
> Sent: Friday, January 03, 2003 10:23 AM
> To:   rpg400-l@midrange.com
> Subject:      Memory Allocation Question
>
>  >> If the value of the pointer at deallocate time is still the same as
> what
> was returned from the initial allocate, what else about it can be
> corrupted?
>
> 1) Have you moved (or in any way "touched" the pointer in such a way as it
> could have been invalidated?  The content would appear the same but the
> tag
> bit would have been turned off rendering it useless as a pointer.
>
> 2) Did you do a realloc and fail to store the new pointer (i.e are you
> attempting to free using the original pointer when the realloc may have
> changed it?
>
> Jon Paris
> Partner400
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.


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