Clear questions and runnable code
get the best and fastest answer
Is it possible to get the size of the memory of a hash/array/variable at runtime, so I can intervene somehow?If you want to find you how much memory your datastructures are using at run-time check out Elian's Devel::Size.
the memory of a process can not be freed while the process is not terminatingFor most (if not all?) modern OSs this is the case. Until a process exits its allocated memory will not be freed.