There is not now (nor will there be) a generalized tool which can tell you how long an arbitrary program will take without actually running it, which in the general case could take forever. That's a fun CS concept to meditate upon:
http://en.wikipedia.org/wiki/Halting_problem
In short: the time your program will take to run can't be known in advance, unless you're operating under a fairly constrained and mathematically rigorous environment, and have stylized your code appropriately on a system offering certain guarantees:
http://en.wikipedia.org/wiki/Real-time_operating_system
If you're experienced, you can sorta-kinda estimate the scale of a memory footprint of a program by looking at the size of your data structures and how many of them there are. The C++ operator sizeof
can help you determine the concrete number of bytes consumed by any individual object, though it won't tell you anything about the amount of memory used for "bookkeeping" behind-the-scenes.
But once again, you mostly just have to run it and use a process monitor to see what happens. Hard to predict, you just empirically examine what happens in practice:
Tracking CPU and Memory usage per process (Windows)
monitor a program's memory usage in Linux