Bug 690339

Summary: gdevprn uses "resize" on page buffer, doubles memory requirement
Product: Ghostscript Reporter: Ray Johnston <ray.johnston>
Component: Graphics LibraryAssignee: Nancy Durgin <nancy.durgin>
Status: RESOLVED FIXED    
Severity: normal CC: christinedelight.top85, info, nancy.durgin
Priority: P4    
Version: master   
Hardware: All   
OS: All   
Customer: Word Size: ---

Description Ray Johnston 2009-03-19 07:10:29 UTC
The gdev_prn_allocate, when it needs to change the page size (such as from
letter to A4) uses 'gs_resize_object' to adjust the size of 'buffer_memory'.

Since resize_object must copy the old contents of buffer_memory to the new
buffer area, the results in BOTH page buffers being allocated, as well as
performing a copy of data that we are going to discard anyway.

This is a reminder bug, to fix this to simply free then allocate instead.
Comment 1 Nancy Durgin 2018-07-09 20:13:45 UTC
Changed to use free/alloc sequence instead of gs_resize_object().