[comp.lang.postscript] Virtual Memory

vg55611@ihuxy.ATT.COM (Gopal) (02/11/89)

I'd like to find out if the Apple Laserwriter Plus we have has the
max. amount of memory that it can have, or if it would be possible
to add more memory.

I ran the "Doctor Laser" program posted a while ago (my thanks to the
person(s) who developed and posted it) and it reported

	Max. available bytes 	= 239316
	Bytes currently in use	= 86576
	Level of Save Nesting	= 2

	blimit = 12500	cmax = 1700 csize = 1480 mmax = 136
	msize = 84 bmax = 136064 bsize = 129060

Based on the above, can someone tell me the answer to my question  (also,
can someone interpret these numbers for me?)

On a related subject, how does a postscript program generally ensure that
all memory used is released when it ends ?  i.e. after doing the printing,
the printer should be left in the same state as before.

Thanks

Venu P. Gopal
UUCP:	att!ihuxy!vg55611
Internet: vg55611@ihuxy.att.com
BITNET: com%"vg55611@ihuxy.att.com"   or   com%"vg55611%ihuxy@research.att.com"

jim@nih-csl.UUCP (jim sullivan) (02/14/89)

>I'd like to find out if the Apple Laserwriter Plus we have has the
>max. amount of memory that it can have, or if it would be possible
>to add more memory.

	My LaserWriter II reference says that you can do this
(up to 12 MB) on an NTX but not on an NT so I would *imagine*
that you couldn't do it on a LaserWriter Plus but hopefully
someone else can give you a more definite answer.

>I ran the "Doctor Laser" program posted a while ago (my thanks to the
>person(s) who developed and posted it) and it reported
>
>	Max. available bytes 	= 239316
>	Bytes currently in use	= 86576
>	Level of Save Nesting	= 2
>
>	blimit = 12500	cmax = 1700 csize = 1480 mmax = 136
>	msize = 84 bmax = 136064 bsize = 129060
>
>Based on the above, can someone tell me the answer to my question  (also,
>can someone interpret these numbers for me?)

	I was afraid I'd get questions about these meanings.  I presented
these values in the condensed form to save space on the page.  This is what
they mean:
		Max. available bytes - The number of bytes available
				       in virtual memory.  Virtual Memory
				       can dynamically be increased in some
				       printers by the printer erasing fonts.

		Bytes currently in use - This refers to the number of bytes
					 of virtual memory in use at the
					 time the program checks it so this
					 number only applies during execution 
					 of the program, in this case, Laser
					 Doctor. (I probably should have left
					 this out).

		Level of Save Nesting - This refers to the number of saves
					which have not had a corresponding
					restore performed.  This only applies
					to the Laser Doctor program as well and
					will always be 2. (I should have left 
					this off as well).

		bmax   - maximum number of bytes available for bitmap storage.
		bsize  - actual  number of bytes   in use  for bitmap storage.
		mmax   - maximum number of font/matrix combinations.
		msize  - actual  number of font/matrix combinations.
		cmax   - maximum number of cached characters.
		csize  - actual  number of cached characters.
		blimit - This is the limit placed on the total number
			  of bytes allowed per character.  This number
			  can be changed with the operator 'setcachelimit'.

>On a related subject, how does a postscript program generally ensure that
>all memory used is released when it ends ?  i.e. after doing the printing,
>the printer should be left in the same state as before.

	All programs should end with a 'showpage', or an 'erasepage' followed
	by 'initgraphics'.  Either of these will reset the graphics state
	to the default values.
	A program that executes something like:

			serverdict begin 0 exitserver
			/somedictionary 100 dict def

	can leave a dictionary on the printer which will not go
	away until you turn the printer off, then on.  When I get
	some strange (unknown source) postscript program, I always
	check for the word 'exitserver' to make sure the program
	will not leave some dictionary in memory.
	If 'somedictionary' is 'statusdict', it will write to an EEROM
	which is non-volatile memory.  Power off/on will not get rid
	of the added dictionary.
	Normally, when a print job finishes with showpage as described above,
        the initial conditions of memory are returned unless an exitserver
        was executed.  At least	this is what I understand to be the case from
        reading my books.  Does anyone know if I'm wrong here??



						Jim Sullivan
						jim@nih-csl.dcrt.nih.gov