|
We have a program that receives an error CEE0810. The starting address for
reallocation is not
valid. It seems to depend on the order of ALLOCs. I ALLOC 5 pointers and then
REALLOC the 3rd.
and 4th. The 4th. pointer allocated always gets this error.
ALLOC 600 pA
ALLOC 48 pB
ALLOC 1200 pC
ALLOC 96 pD
ALLOC 600 pE
REALLOC 1800 pC
REALLOC 144 pD Receives error.
ALLOC 600 pA
ALLOC 48 pB
ALLOC 96 pD
ALLOC 1200 pC
ALLOC 600 pE
REALLOC 1800 pC Receives error.
REALLOC 144 pD Never get here.
Changing the order of REALLOCs has no effect on which pointer gets the error.
Changing
the order of ALLOCs does have an effect. After the allocates I wrote down the
pointer
values. The pointer values do not change between the allocate and reallocate.
I also set
watches that confirm this. The allocates and reallocates occur in different
subprocedures
called from a single procedure which passes the pointers as a parameter. The
modules are
not optimized.
Any ideas?
David Morris
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List! To submit a new *
* message, send your mail to "RPG400-L@midrange.com". To unsubscribe *
* from this list send email to MAJORDOMO@midrange.com and specify *
* 'unsubscribe RPG400-L' in the body of your message. Questions should *
* be directed to the list owner / operator: david@midrange.com *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.