Re: etex and pdftex have diverging memory constraints?
Jonathan Fine <[email protected]>
| Newsgroups | gmane.comp.tex.live |
|---|---|
| Message-ID | <CALD=Yf8PJGQisRdSPiQTD_=4+99Zq13eAviyTFK5bUytiV-0eA@mail.gmail.com> |
Hi You've found a nice puzzle. Any preloaded format files uses space in the main memory. I suspect that etex and pdftex do not occupy the same amount of main memory. And in fact that pdftex tex occupies more. >From my phone. Jonathan On Wed, 27 Aug 2025, 14:15 jfbu via tex-live, <[email protected]> wrote: > 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 am a bit surprised because I can not connect the constraints on TeX > macro expansion with the output format DVI or PDF. Needless to say I am > completely ignorant of the innards. > > If replying please CC as I am not on the list. > > Kind regards > > Jean-François > > >