× 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 seem to recall that reallocing may change the address the memory points to
(in C anyway) but it's a vague memory.  I think you'll want to re-set the
pointer to that address that remalloc returns every time.

Although I could be wrong.

Regards,

Jim Langston

I thought I was wrong once, but I was mistaken.

-----Original Message-----
From: Smith, Nelson [mailto:NSmith@lincare.com]

I've got a MODS based on a pointer with OCCURS = 32767.  I ALLOC & REALLOC
memory to the pointer all during the program.  At some point, I DEALLOC the
pointer and it changes to a NULL pointer.  If I then ALLOC to it again, the
pointer takes on a valid address, but references to the MODS cause a space
offset error (MCH0601) due to trying to operate outside of  "an implicit
process space for activation group-based heap storage".

Is there a rule about not being able to reallocate memory to a pointer once
it has been deallocated or am I just doing it wrong?  The pointer itself
looks like a valid address, but apparently the MODS is no longer based on
it.

Nelson Smith
nsmith@lincare.com
ncsmith@tampabay.rr.com


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.