Notes for DuLL
Although this is not an easy problem because of the amount of coding involved, the algorithm is relatively straightforward.– Performance should not be an issue, nor should size limitations.
The only possible “gotcha” that I can think of would be to try and perform reference counting on the programs themselves instead of just the DLLs, and even then the only penalty is slightly increased complexity. (There's no need to count the programs because the problem guarantees that a program that exits was already running, and that's all you really need to know.)
When the solution runs it prints to STDERR the amount of memory used at each transition so you can trace the execution.