1

As described in this quesion TeX memory is very limited due to the limitation of the computer in time of TeX invention.

I want to know is there any way to free up the TeX memory before reaching its limitation. Assume we want to define a lot of macros more than TeX memory capacity. Is there any way to delete many of them and define new macros in place of them, something like the way we can do in many modern languages, e.g. C uses free function to free up the dedicated dynamic memory by malloc.

javadr
  • 2,404
  • related https://tex.stackexchange.com/questions/316999/release-space-in-the-string-pool – Ulrike Fischer Dec 11 '18 at 11:25
  • 3
    First it might be useful to know what exactly you are doing that requires more memory. Your question is very valid, but often the requirement some from bad programming and can be easily solved. Other times it might be easier to more to lualatex as it has dynamic memory allocation – daleif Dec 11 '18 at 11:34
  • @UlrikeFischer exactly, the same problem. – javadr Dec 11 '18 at 14:15
  • @daleif I've made a package by the name of quran. It uses a lot of macros. Every verse of the Quran has a macro like the way lipsum does. It also contains some translations in other languages, e.g. Farsi, English, Deutch. The Quran has 6236 verses, so it has more than 6236*6 macros in total. Some people asked me to add other translations but it causes TeX memory exceed. I can use just 6236 macros and in every usage of the other translation redefine it, but I think it will be too slow. – javadr Dec 11 '18 at 14:28
  • Did you try lualatex then? It has better font support as well. – daleif Dec 11 '18 at 14:32
  • The question you linked to memory - Are there limits to the number of new macros or commands in TeX/LaTeX - TeX - LaTeX Stack Exchange contains the environment variables/path to configuration file to modify the limit. – user202729 Dec 10 '21 at 06:02

0 Answers0