Re: Freeing memory in Jade (was: Help: Scanning non-SGML files)

Subject: Re: Freeing memory in Jade (was: Help: Scanning non-SGML files)
From: Chris Maden <crism@xxxxxxx>
Date: Fri, 13 Feb 1998 13:04:05 -0500
[James Clark]
> I don't know why you're running out of memory, but that's not the
> reason: the strings returned by read-entity are GC'ed like
> everything else.

The source of the problem was a badly-written recursion.  I was
parsing the EPS with a loop(index, first-char, other-chars, string-so-
far); that meant that nearly the entire string was replicated on each
pass through the loop by the other-chars parameter.  Since I'm
carrying the index around anyway, I don't need the other-chars, and it
doesn't crash now.

Thanks,
Chris

P.S. Those to whom I sent the original routine may want an updated
copy; or they may want to fix the error as an exercise for the
reader.  Either way, I don't have your addresses any more, so mail me
again if you want the new one.
-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • Freeing memory in Jade (was: Help: Scanning non-SGML files)
    • Chris Maden - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id BAA04221Fri, 13 Feb 1998 01:04:23 -0500 (EST)
      • James Clark - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id BAA04561Fri, 13 Feb 1998 01:52:41 -0500 (EST)
        • Chris Maden - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id NAA15169Fri, 13 Feb 1998 13:06:44 -0500 (EST) <=