Alex Cherepanov
2008-12-30 10:31:49 UTC
Set local allocation mode during execution of setpagedevice to
keep composite objects allocated by setpagedevice in local memory
and avoid memory mismatch errors.
DETAILS:
Page device is a subject of save and restore, 'true setglobal
currentpagedevice gcheck ==' is false on Distiller and Ghostscript,
'true setglobal gstate' fails on both Distiller and Ghostscript.
So there's no reasons to have parts of the page device objects
in the global memory.
DIFFERENCES:
None. There's no raster or stdout differences on comparefiles oor
stdout differences on CET.
-------------- next part --------------
Index: gs/Resource/Init/gs_setpd.ps
===================================================================
--- gs/Resource/Init/gs_setpd.ps (revision 9301)
+++ gs/Resource/Init/gs_setpd.ps (working copy)
@@ -654,6 +654,7 @@
{ % We mustn't pop the argument until the very end,
% so that the pseudo-operator machinery can restore the stack
% if an error occurs.
+ currentglobal //false setglobal exch
mark 1 index currentpagedevice
% Check whether we are changing OutputDevice;
@@ -876,6 +877,7 @@
} {
.postinstall
} ifelse
+ setglobal
} odef
% We break out the code after calling the Install procedure into a
keep composite objects allocated by setpagedevice in local memory
and avoid memory mismatch errors.
DETAILS:
Page device is a subject of save and restore, 'true setglobal
currentpagedevice gcheck ==' is false on Distiller and Ghostscript,
'true setglobal gstate' fails on both Distiller and Ghostscript.
So there's no reasons to have parts of the page device objects
in the global memory.
DIFFERENCES:
None. There's no raster or stdout differences on comparefiles oor
stdout differences on CET.
-------------- next part --------------
Index: gs/Resource/Init/gs_setpd.ps
===================================================================
--- gs/Resource/Init/gs_setpd.ps (revision 9301)
+++ gs/Resource/Init/gs_setpd.ps (working copy)
@@ -654,6 +654,7 @@
{ % We mustn't pop the argument until the very end,
% so that the pseudo-operator machinery can restore the stack
% if an error occurs.
+ currentglobal //false setglobal exch
mark 1 index currentpagedevice
% Check whether we are changing OutputDevice;
@@ -876,6 +877,7 @@
} {
.postinstall
} ifelse
+ setglobal
} odef
% We break out the code after calling the Install procedure into a