Summary: | Unfixed Font resource size returned by resourcestatus operator | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Masaki Ushizaka <masaki.ushizaka> |
Component: | Resource | Assignee: | Alex Cherepanov <alex> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | master | ||
Hardware: | All | ||
OS: | All | ||
Customer: | Word Size: | --- | |
Attachments: | patch |
Description
Masaki Ushizaka
2010-01-13 23:07:17 UTC
We don't appear to make any attempt to use the VMusage comment at all. When we define a status 0 (defined by explicit defineresource) or status 2 (not defined but available externally) resource we always assign its size to -1. However, when we define a status 1 resource (defined via findresource) we do a vmstatus before and after defining the resource, and use the difference in the vm used as the size of the resource. This can differ depending on the memory layout and possibly the word size (32 or 64 bit) which means that the answers can be different even on the same machine on different runs. Probably the only way to fix this is to have the vmstatus operator always return the same value, or alter our DefineResource procedure to define status 1 resources with a size of -1. Perhaps another hack in gs_cet.ps to redefine vmstatus to return a fixed value would suffice, though I don't know if Genoa test this to see if it changes. CET 23-33.PS is just examining return value of 'resourcestatus' operator. If it returns -1, it will buy it. I may be little curious about why we designed DefineResource in Font category to do that way. Alex, Henry suggests the workaround in gs_cet.ps as Ken mentioned in Comment #1. Created attachment 5929 [details]
patch
Patch font resource category for CET testing to always return the font
memory usage as unknown (-1) to avoid differences between hosts.
The patch has been committed as a rev. 10679. Regression testing shows no differences. I'll return 23-33.PS to the regression test suite. |