Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!iuvax!rutgers!orstcs!neptune!pvo3366 From: pvo3366@neptune.uucp (Paul O'Neill) Newsgroups: comp.lang.postscript Subject: Re: VMerror Summary: psraster patch Message-ID: <6041@orstcs.CS.ORST.EDU> Date: 15 Aug 88 09:51:37 GMT References: <1086@twitch.UUCP> Sender: netnews@orstcs.CS.ORST.EDU Reply-To: pvo@oce.orst.edu (Paul O'Neill) Distribution: na Organization: College of Oceanography, Oregon State Univ., Corvallis, Or. Lines: 26 In article <1086@twitch.UUCP> tjt@twitch.UUCP ( T.J.Thompson) writes: >In trying to use various Sun-rasterfile-to-postscript programs, >I often get a VMerror from the Apple LaserWriter Plus. This is >usually when trying to do a medium-to-large grey-scale image. What you are seeing is a bug in psraster.c. It keeps creating string objects and not reclaiming VMemory. For big images it finally runs out of VM. Here is a patch that works. change line 194 to ______________________________________________________________________ fprintf( outfile, "{restore save GetImageRow} save 6 1 roll image\n"); ---------------------------------------------------------------------- VM will now be restored every time that image calls GetImageRow. Would some kind soul please rewrite this program to not do run-length encoding? Max compression is 2. Average execution time increase is ~10. Bye. Paul O'Neill pvo@oce.orst.edu Coastal Imaging Lab OSU--Oceanography Corvallis, OR 97331 503-754-3251