Hiram,
Thanks very much for your response.
After playing around it for quite a while, I finally figured out it was
indeed the memory limit set at src/lib/memalloc.c that caused this
problem. I added a factor of 4, let it become "static size_t maxAlloc =
Š*4;". Everything works now. The trick is that after making the above
change, you have to go to the directory "src/lib", and type "make"
command. Then, go to "src/utils/bedGraphToBigWig" to recompile the
bedGraphToBigWig program. Everything would work perfectly and take the
changes you have made.
Using "ulimit -a", I found my max memory limit is 56GB on this machine. It
is enough for processing the 59GB bedGraph file. The peak memory usage is
about 20GB.
The 59GB file has 2,367,330,140 lines.
David