> I took a look and saw the bash process consuming as much as 3+ GB of > memory. I'm not doing anything where I'd expect to be consuming that > much memory.
As a workaround, try using "ulimit -v" to restrict the virtual memory space of the shell itself. (For invoking some child processes, it may be necessary to use an intermediate shell which raises the limit before exec-ing the child.) It is not uncommon for a process (not just bash) to allocate until refused, and only then think about free()ing or collecting garbage. --