Path: utzoo!attcan!uunet!elroy.jpl.nasa.gov!sdd.hp.com!wuarchive!emory!ducvax.auburn.edu!ducvax.auburn.edu!cs220x2a From: cs220x2a@ducvax.auburn.edu (CS220X) Newsgroups: comp.sys.mac.programmer Subject: Linked lists Keywords: Linked lists Pascal Think Message-ID: <91FEB11.084805@ducvax.auburn.edu> Date: 11 Feb 91 13:48:05 GMT Sender: Wade Williams Reply-To: cs220x2a@ducvax.auburn.edu Organization: Auburn University Lines: 21 Nntp-Posting-Host: ducvax.auburn.edu News-Software: VAX/VMS VNEWS 1.3-4 Lines: 21 I'm working on an application in Think Pascal 3.0 and need to use a linked list. The problem is, how do I avoid the memory manager moving all of my nodes around? I could make them all non-relocatable, but that would result in a tremendously fragmented stack (or is it heap? I always forget). The other option would be to reference each node as a handle, thereby eliminating the movement problem, but causing some other problems in terms of extra memory usage. Finally, since I know I'll never have more than 50 elements, I could use an array-implemented linked list, but I'd rather use pointers and not place any restrictions on something that may expand in the future. What do you think? What's the best way to implement a linked list on the Macintosh? Thanks, Wade Williams cs220x2a@ducvax.auburn.edu