Hope this helps you in some ways...
http://perl.apache.org/guide/performance.html#Measuring_the_Memory_of_the_Proc
Mike Friesen wrote:
>
> I am checking for free memory using the command "top" and
> "cat /proc/meminfo". I've tested this under Redhat 6.2 kernel 2.2.14 and
> Redhat 7.1 kernel 2.4.2.
Mithun