Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!uwvax!umnd-cs!umn-cs!meccts!ahby From: ahby@meccts.MECC.MN.ORG (Shane P. McCarron) Newsgroups: comp.sys.apple Subject: Re: FRE Message-ID: <2746@meccts.MECC.MN.ORG> Date: Wed, 13-May-87 14:48:42 EDT Article-I.D.: meccts.2746 Posted: Wed May 13 14:48:42 1987 Date-Received: Sat, 16-May-87 07:32:01 EDT References: <8705052345.AA17994@cdfb.toronto.edu> <153@genat.UUCP> Reply-To: ahby@meccts.UUCP (Shane P. McCarron) Distribution: world Organization: MECC Technical Services, St. Paul, MN Lines: 35 In article <153@genat.UUCP>: >FRE(0) will give free space >FRE(" ") will force garbage collection and then give free space > >There is a difference! I am looking at the FRE code, and it reads: fre lda valtyp beq fre1 ; if not a string jsr frestrE ; frestrE frees up tmp fre1 jsr garbag sec lda fretop ; figure out free space sbc strend tay lda fretop+1 sbc strend+1 ; and fall into givayf Valtyp is 0 if a numeric, 0xff if a string. FrestrE is a secondary entry point in frestr that assumes there is a string. Frestr falls into fretmp, which will adjust fretop if the temporary string (" " in this case) is the last string in memory. Since it is most assuredly the last string in memory, fretop will be adjusted. However, it would never have been moved down if a string hadn't been used in the fre() call, so that may not be a great adantage. Regardless of what the argument is, fre executes garbag, which forces a garbage collect. -- Shane P. McCarron UUCP ihnp4!meccts!ahby, ahby@MECC.MN.ORG MECC Technical Services ATT (612) 481-3589 (C) Copyright 1987 Shane P. McCarron Redistribution allowed only if your recipients can redistribute