![更改默认内存大小时出现问题](https://linux22.com/image/422534/%E6%9B%B4%E6%94%B9%E9%BB%98%E8%AE%A4%E5%86%85%E5%AD%98%E5%A4%A7%E5%B0%8F%E6%97%B6%E5%87%BA%E7%8E%B0%E9%97%AE%E9%A2%98%20.png)
我有一个大项目(一本书),大约 450 页。我在 OSX 上使用 TexShop 和 LaTeX 制作 PDF。
该项目在第一遍构建成功,但在第二遍填充内容和交叉引用时失败了:
(/Users/Sean/PIC/BookLibraries/LUT.X/LUT1.asm)
(/Users/Sean/PIC/BookLibraries/LUT.X/LUT2.asm [281])
./subroutines.tex:130: TeX capacity exceeded, sorry [main memory size=5000000].
<argument> ...p_box \vbox_unpack:N \l_shipout_box
\kern \c_zero_dim
l.130 }
If you really absolutely need more capacity,
you can ask a wizard to enlarge me.
Here is how much of TeX's memory you used:
102928 strings out of 479917
2426234 string characters out of 5882726
4999999 words of memory out of 5000000
105338 multiletter control sequences out of 15000+600000
755283 words of font info for 339 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
146i,20n,184p,2382b,2938s stack positions out of 5000i,500n,10000p,200000b,80000s
./subroutines.tex:130: ==> Fatal error occurred, no output PDF file produced!
故障位置在列表中,但并不罕见,书中有很多这样的情况。
我通过添加 .../texlive/2020/texmf.cnf 修改了
main_memory = 600000 % words of inimemory available; also applies to inimf&mp
main_memory.tex = 600000
main_memory.latex = 600000
main_memory.pdflatex = 600000
但错误仍然报告失败时主内存大小为 [主内存大小=5000000]。
还有其他我可以改变的参数吗?
答案1
至少在我的情况下,这种方法是有效的,我通过复制章节模拟了这本书的预期最终大小(约 900 页)。如果其他人真的内存不足,这种方法可能会有所帮助。
main_memory = 12000000
extra_mem_bot = 12000000
font_mem_size = 12000000
pool_size = 12000000
buf_size = 12000000