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



Terrence Enger wrote:
Lorraine has since answered, and her answer rules out the possibility I
was thinking of. To wit, if wa retained its value from one call to the
next but arrayPtr was procedure-local, then the procedure could try to
realloc without having done the alloc.

...but she ran the code in debug and arrayPtr had the same value at the time of the %realloc that it had at the time of the %alloc. That being the case, the value of arrayPtr couldn't have been lost when the procedure ended (if the value was lost, it would show *NULL in the debug)

The 'wa' variable is only used at the moment the %alloc() or %realloc() is called, it doesn't matter what it's value is at other times. If it lost it's value, you might end up calling %realloc() with the wrong size, which is a bad thing, but would be perfectly legal from the operating system's perspective, so it wouldn't generate an error.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.