From 45f02b1cb5ccbc4d26b35071d677cc5b53e690e5 Mon Sep 17 00:00:00 2001 From: Phil Race Date: Thu, 23 Dec 2010 15:28:59 -0800 Subject: [PATCH] 6891551: Font rasterisation uses more heap than needed for some strikes Reviewed-by: jgodinez --- jdk/src/share/classes/sun/font/FileFontStrike.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jdk/src/share/classes/sun/font/FileFontStrike.java b/jdk/src/share/classes/sun/font/FileFontStrike.java index ca72867f8cc..ae6045f696c 100644 --- a/jdk/src/share/classes/sun/font/FileFontStrike.java +++ b/jdk/src/share/classes/sun/font/FileFontStrike.java @@ -60,8 +60,8 @@ public class FileFontStrike extends PhysicalStrike { private volatile int glyphCacheFormat = UNINITIALISED; - /* segmented arrays are blocks of 256 */ - private static final int SEGSHIFT = 8; + /* segmented arrays are blocks of 32 */ + private static final int SEGSHIFT = 5; private static final int SEGSIZE = 1 << SEGSHIFT; private boolean segmentedCache; @@ -171,7 +171,7 @@ public class FileFontStrike extends PhysicalStrike { mapper = fileFont.getMapper(); int numGlyphs = mapper.getNumGlyphs(); - /* Always segment for fonts with > 2K glyphs, but also for smaller + /* Always segment for fonts with > 256 glyphs, but also for smaller * fonts with non-typical sizes and transforms. * Segmenting for all non-typical pt sizes helps to minimise memory * usage when very many distinct strikes are created.