[futurebasic] Re: Linked Lists

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 1998 : Group Archive : Group : All Groups

From: Vic Maslen Advanced Materials <maslen@...>
Date: Thu, 1 Oct 1998 08:59:50 +1000 (EST)
Firstly, thanks to everyone for their most helpful contributions 
to the current discussion on Linked Lists.  I still have one
conceptual problem which might be due to an inadequate grasp on Handles.
In "Tedd's Linked List", published on the FB Webring, Tedd uses just one
global handle, namely gDataH&, to store data of the linked list. As one
builds up the list and progressively increases the handle size, the 
memory block contains successive entries like the following
200000
100
1000
200008
101
1001
200016
102
1002
.
.
.
where 200000 and like numbers are addresses to the next record and
100,1000 are two items stored in the first record, 101,1001 are
corresponding items in the second record and so on. Tracking through
Tedd's algorithm it seems to me that if, as the size of the list grows
sufficiently that the memory block associated with gDataH& has to be
relocated, then surely the addresses for the early records would become
out of date.  
I feel sure that my conclusion is wrong but I cannot see why.  I do note
that the management of windows has been given as a good example of the use
of linked lists.  However, I understand that window information is always
stored in pointers, not in handles.
Vic Maslen