Re: etex and pdftex have diverging memory constraints?

Herbert Voss <[email protected]>
Newsgroups gmane.comp.tex.live
Message-ID <[email protected]>

Am 27.08.25 um 15:15 schrieb jfbu via tex-live:
> Hi,
>
> Sorry if this is very basic, but I always thought the sole difference between etex and pdftex is that the former works to produce a dvi and the latter a pdf.
>
> So, I was surprised to discover (or perhaps I observed that years ago and forgot) that pdftex has slightly more constrained memory constraints on macro expansion.
>
> Here is a test file testxintLength.tex
>
> ----
> \input xintkernel.sty
> \edef\x{\romannumeral\xintreplicate{%
> 2492679%
> }{F}}
> \expandafter\xintLength\expandafter{\x}
> \bye
> ----
>
> (the code creates a macro \x expanding to 2492679 F's then attempts to measure how many F's there are).
>
> Compilation with etex succeeds  (even with 2492694 in place of 2492679).
>
> $ etex testxintLength.tex
> This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=etex)
>   restricted \write18 enabled.
> entering extended mode
> (./testxintLength.tex (./xintkernel.sty) [1] )
> Output written on testxintLength.dvi (1 page, 216 bytes).
> Transcript written on testxintLength.log.
>
> But compilation with pdftex fails.
>
> $ pdftex testxintLength
> This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdftex)
>   restricted \write18 enabled.
> entering extended mode
> (./testxintLength.tex (./xintkernel.sty)
> ! TeX capacity exceeded, sorry [main memory size=5000000].
> <inserted text> 2492679
>                          \xintlength ...xint_c_i \xint_c_ \xint_bye \relax                                                     l.5 \expandafter\xintLength\expandafter{\x}
>                                              !  ==> Fatal error occurred, no output PDF file produced!
> Transcript written on testxintLength.log.

I cannot see it with an up-to-date TL2025 (macOS):

voss>mist:$ pdfetex  xyz.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) 
(preloaded format=pdfetex)
  restricted \write18 enabled.
entering extended mode
(./xyz.tex 
(/usr/local/texlive/2025/texmf-dist/tex/generic/xint/xintkernel.sty)
  [1{/usr/local/texlive/2025/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] 
)</u
sr/local/texlive/2025/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on xyz.pdf (1 page, 9876 bytes).
Transcript written on xyz.log.

Herbert
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.