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



>Always remember that the corruption may come from ANYWHERE.

An ADDTRC on all statements showing the variable that gets corrupted when
changed will help pinpoint the problem. Basically the trace holds onto the
old value and then checks if it has changed after every line of code. I'm
not sure how a pointer would be handled because of the silly tag bit, but
it's worth a shot.

-Walden

------------
Walden H Leverich III
President
Tech Software
(516) 627-3800 x11
(208) 692-3308 eFax
WaldenL@TechSoftInc.com
http://www.TechSoftInc.com 

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)
 

-----Original Message-----
From: Buck Calabro [mailto:Buck.Calabro@commsoft.net] 
Sent: Friday, January 03, 2003 2:43 PM
To: rpg400-l@midrange.com
Subject: RE: Memory Allocation Question


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

Hi Nelson!
When I do something like this I always look to the parameter list.  Make
certain that ALL the parameter lists match; not just the ones relating to
this particular function.  Also, look to any place where you have varying
length strings, especially options(*varsize).  It is trivially easy to shoot
myself in the foot by doing a CLEAR or MOVE *BLANKS to a *varsize field.
The problem is that the procedure doesn't own all that memory: the caller
does.  And if the caller only declared 10 bytes instead of the maximum 100,
I am clearing 90 bytes of the caller's memory that I don't own.

Always remember that the corruption may come from ANYWHERE.  The error only
comes when some unsuspecting reference gets made to the bad memory.
  --buck
_______________________________________________
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.

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.