[OpenJDK 2D-Dev] Question about AccelGlyphCache_AddGlyph

Dmitri Trembovetski Dmitri.Trembovetski at Sun.COM
Mon Jun 9 14:51:34 UTC 2008

Clemens Eisserer wrote:
> Sorry again, already found where it is set to null :-/
> lg Clemens
> 2008/6/9 Clemens Eisserer <linuxhippy at gmail.com>:
>> Hello,
>> 1. In AccelGlyphCache_AddGlyph the cache simply nulls the
>> cellInfo-field, if the glyphinfo is removed from cache:
>>       // if the cell is occupied, notify the base glyph that its
>>       // cached version is about to be kicked out
>>       cellinfo->glyphInfo->cellInfo = NULL;
>> Is this really always safe? Couldn't there be the case that glyphInfo
>> has already been free'd, so that cellinfo->glyphInfo points to
>> garbage?

   I guess you found that already.

>> 2. Where can I set the logging-level used at build-time, so that the
>> J2dTraceLn's will be compiled in?

   If you build a debug or fastdebug build, they're compiled in.
   J2dRlsTraceLns (Rls -> Release) are always compiled in, even in
   an optimized binaries, so don't use them in performance
   critical places.

   To enable, set J2D_TRACE_LEVEL=N (where is in 1-4), see


>> Thanks, Clemens

More information about the 2d-dev mailing list