Skip to main content
Participant
July 28, 2012
Question

Memory Heavy PostScript Page

  • July 28, 2012
  • 1 reply
  • 934 views

Hi All,

I am looking for memory heavy PostScript page. If such example is not easy to refer to is there a easy way to create a one where a page would take large amount of space in memory to process a page.

Appreciate any help.

Thanks in advance

Rubu

This topic has been closed for replies.

1 reply

Participating Frequently
August 21, 2012

Hi, Rubu -

Are you trying to stress memory to test the printer's memory management?

Assuming your goal is purely to consume memory, with no other purpose, you could gimmick up a set of arrays of strings:

     /array1     [

          1000 { 64000 string } repeat

     ] def

     /array2     [

          1000 { 64000 string } repeat

     ] def

Each of the arrays above consumes 64 megabytes of VM; create enough of them and you'll eventually provoke memory issues of some sort or other. By the way, the above code snippet will fail on a Level 1 printer, because it depends on the Operand Stack being able to resize itself.

You could also do something with ReusableStreamDecode, if you have a Level 3 printer:

     currentfile /ReusableStreamDecode filter

     ABCDEFGHIJK...

     .... The "filter" invocation should be followed in the stream by an

     ... arbitrary amount of arbitrary data.

     ... gigabytes of it, if you want...

Or am I misunderstanding what you're trying to do?

-------

John Deubert

Acumen Training

PostScript & PDF consulting and training

www.acumentraining.com