× 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 Jan 9, 2011, at 6:28 AM, rpg400-l-request@xxxxxxxxxxxx wrote:

Yes. I was under that impression too, but at v5.4.0 linked list nodes ended up containing garbage after running realloc.

That could have happened at any time - I don't think v5.4 had anything to do with that. It would always have had that potential - the fact that the pointers were still valid shows that they were moved correctly. v5.4 probably just moved some stuff around that caused it to show up.

As others have noted, if you embed pointers to locations within the space then they will never be correct after moving the data. The memory allocation routines would not modify the pointers.

Any linked list that needs to grow in this manner should use offsets - which is much more efficient in storage terms anyway since pointers are 16 bytes long. It also means that the same logic can easily support linked lists in User Spaces. In your case, since User Spaces can grow as needed (to 16Mb anyway), it might have worked better for you than using dynamic memory.


Jon Paris

www.Partner400.com
www.SystemiDeveloper.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.