You have several possibilities if you use TeXLive (with MikTeX see Werner's link at the question comment).
1) A simple but "bad" method: you can modify the original texmf.cnf
. This file is here:
/some/path/to/texlive/2011/texmf/web2c/texmf.cnf
(2011 for me but it's the same with 2010) BUT If you modify this original file, YOUR CHANGES WILL BE LOST when it is updated.
What can you modify?
The values below are used for the pgf manual (see /doc/generic/pgf/tex-en/texmf.cnf
)
main_memory = 9000000 % words
extra_mem_top = 6000000 % extra high memory for chars, tokens, etc.
extra_mem_bot = 6000000 % extra low memory for boxes, glue, breakpoints,
% Extra space for the hash table of control sequences (which allows 10K
% names as distributed).
hash_extra = 200000
% Max number of characters in all strings, including all error messages,
% help texts, font names, control sequences. These values apply to TeX and MP.
pool_size = 3850000
2) Better, instead of modifying the original file, put your changes, and only your changes, in ../../texmf.cnf
. That is, if this file is installed in:
/some/path/to/texlive/2011/texmf/web2c/texmf.cnf
add your custom settings to
/some/path/to/texlive/2011/texmf.cnf
For example, MacTeX adds in the file /usr/local/texlive/2011/texmf.cnf
:
TEXMFHOME = ~/Library/texmf
TEXMFVAR = ~/Library/texlive/2011/texmf-var
TEXMFCONFIG = ~/Library/texlive/2011/texmf-config
Important : include only your changed values, not a copy of the whole thing!
3) Another possibility is to use another file. This is described in the section 6 Memory and Speed Considerations of the pgfplots
package, but you can use a variant like the one used for the pgfmanual if you know how to use a MakeFile
It employs a 'texmf.cnf' which lies in ../../text-en. dist: FORCE
export TEXMFCNF="../../text-en:$(TEXMFCNF)";
This is interesting to see how you can compile the pgfmanual. This documentation needs a lot of memory to be compiled
pgfplots
package documentation.