Discovered when running the TDML tests for the link16 schema.
Even if you select exactly one test using the eclipse GUI, and run only that one, it seems like the TDML runner is compiling many more top levels than that. Perhaps it is compiling top levels for every test in the TDML file? It's not clear what it is doing, but it certainly is using a ton more memory.
I am not certain what is going wrong, but there is a huge discrepancy between the amount of space and time it takes to compile and run a single TDML test from a scala code file in src/test/scala, and the amount of time it takes to compile the same schema to binary file using the daffodil command line.
Ex: For link16, from eclipse, select one test, run-as-junit-test: Uses almost 9Gbytes of memory (Had to increase JVM to 10Gig with -Xmx10G option) and takes 7 minutes (on my workstation).
But the same schema, compiled from the daffodil command line for the same top-level element takes 90 seconds to compile and creates a 2.5Mbyte binary file.
So, running the TDML runner is creating massively more memory usage. It is not clear why.