commit -- patch: remove misc memory allocation/free penalties


Subject: commit -- patch: remove misc memory allocation/free penalties
From: Aaron Lehmann (aaronl@vitelus.com)
Date: Thu Jul 13 2000 - 11:55:38 CDT


Two patches from wjc. I love patches of this nature, keep it up.
CVS:
----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: src/af/gr/unix/gr_UnixGraphics.cpp src/text/fmt/xp/fp_Run.cpp
CVS: src/text/fmt/xp/fp_TextRun.cpp
CVS:
----------------------------------------------------------------------

On Thu, 13 Jul 2000, WJCarpenter wrote:

> This patch, against 071200 nightly sources, removes a few instances of
> memory allocations and frees that don't have to happen. Code is XP,
> tested on Linux.
>
> 1. In fp_TextRun::_drawSquiggle(), automatic storage is now used if
> the number of points in the squiggle is less than 100, which covers
> most cases. This routine is called on the way to drawing squiggles
> under misspelled words.
>
> 2. In fp_TabRun::_drawArrow(), a polyline with 8 points is used to
> draw an arrow for invisible tab characters. The function now uses an
> automatic storage array of 8 points.
>
> I just happened to stumble across these as I was poking around looking
> for something else.
> --
> bill@carpenter.ORG (WJCarpenter) PGP 0x91865119
> 38 95 1B 69 C9 C6 3D 25 73 46 32 04 69 D6 ED F3
>
>



This archive was generated by hypermail 2b25 : Thu Jul 13 2000 - 11:55:49 CDT