Bug 690339 - gdevprn uses "resize" on page buffer, doubles memory requirement
Summary: gdevprn uses "resize" on page buffer, doubles memory requirement
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: master
Hardware: All All
: P4 normal
Assignee: Nancy Durgin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-19 07:10 UTC by Ray Johnston
Modified: 2018-07-09 20:13 UTC (History)
3 users (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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().