May the file LuaInsert.tex consist of
\documentclass{minimal}
\makeatletter
\newcommand{\stressInsert}[1]{%
\@tempcnta=0\relax%
\@whilenum\the\@tempcnta<#1\do%
{\advance\@tempcnta +1\relax%
\expandafter\newinsert\csname TestInsert\the\@tempcnta\endcsname%
\message{insert \the\@tempcnta: \the\allocationnumber^^J}%
}%
}
\makeatother
\stressInsert{70000}
\begin{document}
\end{document}
then
> lualatex LuaInsert.tex
creates LuaInsert.log, which also contains:
This is LuaHBTeX, Version 1.16.0 (TeX Live 2023) (format=lualatex 2023.4.4)
...
\TestInsert1=\insert199
insert 1: 199
\TestInsert2=\insert198
insert 2: 198
...
\TestInsert17=\insert183
insert 17: 183
[ *** 1st JUMP HERE *** ]
\TestInsert18=\insert252
insert 18: 252
\TestInsert19=\insert251
insert 19: 251
...
\TestInsert68=\insert202
insert 68: 202
\TestInsert69=\insert201
insert 69: 201
[ *** 2nd JUMP HERE *** ]
\TestInsert70=\insert65534
insert 70: 65534
\TestInsert71=\insert65533
insert 71: 65533
...
\TestInsert65350=\insert254
insert 65350: 254
\TestInsert65351=\insert253
insert 65351: 253
\TestInsert65352=\insert252 [ *** AGAIN?! ***]
insert 65352: 252
\TestInsert65353=\insert251 [ *** AGAIN?! ***]
insert 65353: 251
...
\TestInsert65368=\insert236 [ *** AGAIN?! ***]
insert 65368: 236
\TestInsert65369=\insert235 [ *** AGAIN?! ***]
insert 65369: 235
! No room for a new \count .
\ch@ck ...\else \errmessage {No room for a new #3}
\fi
l.12 \stressInsert{70000}
? x
So, are \insert252 to \insert235 used twice?!
And Lua does not even stop there because of "No room for a new insert",
but because there is no room for a new \count! Otherwise more inserts
would see double use?
Should after \insert253 (!, not 235) the next \newinsert produce some
error "No room for a new \insert"?
_______________________________________________
dev-luatex mailing list
dev-luatex@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-luatex