From d4e52b57b525dacdb1d4f6aabc0c3ab5b76447cb Mon Sep 17 00:00:00 2001 From: Chris Liddell Date: Fri, 11 Mar 2022 10:37:14 +0000 Subject: Use the correct VM mode to allocate device container We need to use the same VM mode (allocator) to allocate the Postscript device container as the device itself was allocated from. From the debug-Z@ nightly test: ./gpdl -I/home/regression/cluster/gs.2/lib \ -sOutputFile=tests_private__comparefiles__Bug695765.pdf.pdf.ppmraw.72.0..gpdl_pdf.pdf \ -Z@ -sDEVICE=pdfwrite -r72 -Z: -sDEFAULTPAPERSIZE=letter -dNOPAUSE -dBATCH -dClusterJob \ ../../tests_private/comparefiles/Bug695765.pdf --- psi/zdevice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/psi/zdevice.c b/psi/zdevice.c index 349c2fd3b..99beaff7f 100644 --- a/psi/zdevice.c +++ b/psi/zdevice.c @@ -120,7 +120,7 @@ zcurrentdevice(i_ctx_t *i_ctx_p) gs_ref_memory_t *mem = (gs_ref_memory_t *) dev->memory; psi_device_ref *psdev; - psdev = gs_alloc_struct(imemory, psi_device_ref, &st_psi_device_ref, "zcurrentdevice"); + psdev = gs_alloc_struct(dev->memory, psi_device_ref, &st_psi_device_ref, "zcurrentdevice"); if (!psdev) { return_error(gs_error_VMerror); } @@ -154,7 +154,7 @@ zcurrentoutputdevice(i_ctx_t *i_ctx_p) if (code < 0) return code; - psdev = gs_alloc_struct(imemory, psi_device_ref, &st_psi_device_ref, "zcurrentdevice"); + psdev = gs_alloc_struct(dev->memory, psi_device_ref, &st_psi_device_ref, "zcurrentdevice"); if (!psdev) { return_error(gs_error_VMerror); } -- cgit v1.2.1