<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Le 10/02/2011 15:58, Michael Joyner a écrit :
    <blockquote
      cite="mid:AANLkTinwwkM1LfQaSJ8EHJq4ofw=HAR3OObmg9sDUCar@mail.gmail.com"
      type="cite"><br>
      <br>
      <div class="gmail_quote">On Thu, Feb 10, 2011 at 8:21 AM, Paul
        Isambert <span dir="ltr"><<a moz-do-not-send="true"
            href="mailto:zappathustra@free.fr">zappathustra@free.fr</a>></span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          Le 10/02/2011 04:39, Ross Moore a écrit :
          <div>
            <div class="h5"><br>
              <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
                0.8ex; border-left: 1px solid rgb(204, 204, 204);
                padding-left: 1ex;">
                Hi Michael, and Heiko,<br>
                <br>
                On 10/02/2011, at 1:49 PM, Michael Joyner wrote:<br>
                <br>
                <blockquote class="gmail_quote" style="margin: 0pt 0pt
                  0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);
                  padding-left: 1ex;">
                  <br>
                  On Wed, Feb 9, 2011 at 9:30 PM, Ross Moore<<a
                    moz-do-not-send="true"
                    href="mailto:ross.moore@mq.edu.au" target="_blank">ross.moore@mq.edu.au</a>>
                   wrote:<br>
                  <br>
                  <br>
                  See how large you can set the  "save size" parameter.<br>
                  Multiply by 10, or 100, or 1000... .<br>
                  <br>
                  I'd say you are exploring to the boundaries of what
                  XeTeX<br>
                  is capable of doing.<br>
                  <br>
                  <br>
                  save size won't go over 80,000 :(<br>
                </blockquote>
                OK.<br>
                <br>
                But we don't need it now.<br>
                Here's the cause of the problem.<br>
                <br>
                The package source  xesearch.sty   has a technical
                problem.<br>
                The macros  \xs@String  and  \xs@Stack  are used as
                variables,<br>
                repeatedly changing their expansions. However, sometimes
                the code<br>
                uses \edef\xs@String{...} but mostly it uses
                \xdef\xs@String{...}.<br>
                <br>
                This mixture of local/global scope is what causes the
                loss of<br>
                string space, because an \edef instance requires the
                previous \xdef<br>
                instance to be retained, not discarded. Then comes
                another \xdef<br>
                which may release the previous \edef's memory, but not
                that of the<br>
                 \xdef  prior to the \edef .  Hence memory usage grows.<br>
                <br>
                By making all instances become global, I now get your
                document to<br>
                finish, along with the Index page.<br>
                <br>
                Here's the memory usage:<br>
                <br>
                <blockquote class="gmail_quote" style="margin: 0pt 0pt
                  0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);
                  padding-left: 1ex;">
                  <blockquote class="gmail_quote" style="margin: 0pt 0pt
                    0pt 0.8ex; border-left: 1px solid rgb(204, 204,
                    204); padding-left: 1ex;">
                    <blockquote class="gmail_quote" style="margin: 0pt
                      0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
                      204, 204); padding-left: 1ex;">
                      Here is how much of TeX's memory you used:<br>
                       26092 strings out of 494542<br>
                       451878 string characters out of 3157455<br>
                       480737 words of memory out of 3000000<br>
                       29083 multiletter control sequences out of
                      15000+200000<br>
                       8574 words of font info for 51 fonts, out of
                      3000000 for 9000<br>
                       669 hyphenation exceptions out of 8191<br>
                       40i,7n,43p,1687b,9339s stack positions out of
                      5000i,500n,10000p,200000b,50000s<br>
                    </blockquote>
                  </blockquote>
                </blockquote>
                <br>
                <br>
                <br>
                Here's the patch needed to modify  xesearch.sty .<br>
                <br>
                <br>
              </blockquote>
            </div>
          </div>
        </blockquote>
        <div><br>
        </div>
        <div>Does this look right?</div>
      </div>
    </blockquote>
    <br>
    This looks ok to me, except:<br>
    <br>
    <blockquote
      cite="mid:AANLkTinwwkM1LfQaSJ8EHJq4ofw=HAR3OObmg9sDUCar@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div>@@ -975,7 +975,7 @@</div>
        <div>-  \def\xs@String{#2}%</div>
        <div>+  \gdef\xs@String{#2}%</div>
      </div>
    </blockquote>
    <br>
    <blockquote
      cite="mid:AANLkTinwwkM1LfQaSJ8EHJq4ofw=HAR3OObmg9sDUCar@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div>@@ -983,7 +983,7 @@</div>
        <div>-  \def\xs@Stack{#2}%</div>
        <div>+  \gdef\xs@Stack{#2}%<br>
        </div>
      </div>
    </blockquote>
    <br>
    (I've turned \xdef into \gdef). Now, if your document works
    properly, I'll release the patch.<br>
    Thanks again,<br>
    Paul<br>
    <br>
  </body>
</html>