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



On Fri, 3 Jan 2003, Smith, Nelson wrote:
>
> Yes, I am using %SIZE() on the initial allocate.  Is there a problem or
> gotcha with using this BIF?  I just tried replacing it with a hardcoded
> number and it made no difference.
>

No, quite the opposite.   Doing the calculations manually or using a
hard-coded number is error-prone and may lead to the problem that you're
describing.   Using %size() SHOULD be safe.

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

Pointers are very special entities on the iSeries.  They have to be
aligned on 16-byte boundaries, and they have special "tag bits" that are
not visible in STRDBG which have to be set properly.




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.