[XeTeX] Running out of memory in XeSearch while trying to XeIndex on largish latex files.

Paul Isambert zappathustra at free.fr
Thu Feb 10 16:16:14 CET 2011


Le 10/02/2011 15:58, Michael Joyner a écrit :
>
>
> On Thu, Feb 10, 2011 at 8:21 AM, Paul Isambert <zappathustra at free.fr 
> <mailto:zappathustra at free.fr>> wrote:
>
>     Le 10/02/2011 04:39, Ross Moore a écrit :
>
>         Hi Michael, and Heiko,
>
>         On 10/02/2011, at 1:49 PM, Michael Joyner wrote:
>
>
>             On Wed, Feb 9, 2011 at 9:30 PM, Ross
>             Moore<ross.moore at mq.edu.au <mailto:ross.moore at mq.edu.au>>
>              wrote:
>
>
>             See how large you can set the  "save size" parameter.
>             Multiply by 10, or 100, or 1000... .
>
>             I'd say you are exploring to the boundaries of what XeTeX
>             is capable of doing.
>
>
>             save size won't go over 80,000 :(
>
>         OK.
>
>         But we don't need it now.
>         Here's the cause of the problem.
>
>         The package source  xesearch.sty   has a technical problem.
>         The macros  \xs at String  and  \xs at Stack  are used as variables,
>         repeatedly changing their expansions. However, sometimes the code
>         uses \edef\xs at String{...} but mostly it uses \xdef\xs at String{...}.
>
>         This mixture of local/global scope is what causes the loss of
>         string space, because an \edef instance requires the previous
>         \xdef
>         instance to be retained, not discarded. Then comes another \xdef
>         which may release the previous \edef's memory, but not that of the
>          \xdef  prior to the \edef .  Hence memory usage grows.
>
>         By making all instances become global, I now get your document to
>         finish, along with the Index page.
>
>         Here's the memory usage:
>
>                     Here is how much of TeX's memory you used:
>                      26092 strings out of 494542
>                      451878 string characters out of 3157455
>                      480737 words of memory out of 3000000
>                      29083 multiletter control sequences out of
>                     15000+200000
>                      8574 words of font info for 51 fonts, out of
>                     3000000 for 9000
>                      669 hyphenation exceptions out of 8191
>                      40i,7n,43p,1687b,9339s stack positions out of
>                     5000i,500n,10000p,200000b,50000s
>
>
>
>
>         Here's the patch needed to modify  xesearch.sty .
>
>
>
> Does this look right?

This looks ok to me, except:

> @@ -975,7 +975,7 @@
> -  \def\xs at String{#2}%
> +  \gdef\xs at String{#2}%

> @@ -983,7 +983,7 @@
> -  \def\xs at Stack{#2}%
> +  \gdef\xs at Stack{#2}%

(I've turned \xdef into \gdef). Now, if your document works properly, 
I'll release the patch.
Thanks again,
Paul

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20110210/d95e727a/attachment.html>


More information about the XeTeX mailing list